We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5605134 + b77bfee commit 7da76a7Copy full SHA for 7da76a7
1 file changed
lib/psych/nodes/node.rb
@@ -55,7 +55,8 @@ def to_ruby(symbolize_names: false, freeze: false, strict_integer: false)
55
#
56
# See also Psych::Visitors::Emitter
57
def yaml io = nil, options = {}
58
- require "stringio"
+ require "stringio" unless defined?(StringIO)
59
+
60
real_io = io || StringIO.new(''.encode('utf-8'))
61
62
Visitors::Emitter.new(real_io, options).accept self
0 commit comments