ostruct
ostruct copied to clipboard
fix incorrect deserialization of some legacy formats
In at least some cases, the legacy format includes an additional field that needs to be considered.
# ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]
require "ostruct"
require "yaml"
os = OpenStruct.new
os.a = 'b'
YAML.dump(os)
# => "--- !ruby/object:OpenStruct\ntable:\n :a: b\nmodifiable: true\n"