You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When limits defined by max_nesting or max_bytesize options are encountered, roundtrip operations fail. The problem is illustrated in the following script:
require 'lines'
require 'json'
require 'yaml'
class LinesRoundtrip
::DATA = {
large: { "foo" => "b#{'a'*2048}r" },
small: { "foo" => "bar" }
}
def run!
roundtrip DATA[:small], Lines
roundtrip DATA[:small], JSON
roundtrip DATA[:small], YAML
roundtrip DATA[:large], Lines
roundtrip DATA[:large], JSON
roundtrip DATA[:large], YAML
end
def roundtrip(data, serializer)
puts "Attempting to roundtrip using #{serializer.name}:"
puts " #{data.inspect}"
dump = serializer.dump(data)
load = serializer.load(dump)
puts "Ended up with:"
puts " #{load.inspect}"
puts "---"
end
end
begin
if $0 == __FILE__
LinesRoundtrip.new().run!
end
rescue Interrupt
# Ctrl^C
exit 130
rescue Errno::EPIPE
# STDOUT was closed
exit 74 # EX_IOERR
end
When that script is run, Lines fails to roundtrip the large value.
The text was updated successfully, but these errors were encountered:
When limits defined by
max_nesting
ormax_bytesize
options are encountered, roundtrip operations fail. The problem is illustrated in the following script:When that script is run, Lines fails to roundtrip the large value.
The text was updated successfully, but these errors were encountered: