Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Psych::Streaming::ClassMethods#new
new(io)
ext/psych/lib/psych/streaming.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/ext/psych/lib/psych/streaming.rb, line 8
def new io
emitter = const_get(:Emitter).new(io)
class_loader = ClassLoader.new
ss = ScalarScanner.new class_loader
super(emitter, ss, {})
end
Create a new streaming emitter. Emitter will print to io. See Psych::Stream for an example.