mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 04:24:04 +02:00
[ruby/psych] Fix custom marshalization with symbolize_names: true
ee26f26ab5
This commit is contained in:
parent
155cd7fd2a
commit
c110ade0d2
2 changed files with 11 additions and 3 deletions
|
@ -51,5 +51,13 @@ module Psych
|
|||
assert(PsychCustomMarshalable === loaded)
|
||||
assert_equal(2, loaded.foo)
|
||||
end
|
||||
|
||||
def test_init_symbolize_names
|
||||
obj = PsychCustomMarshalable.new(1)
|
||||
loaded = Psych.load(Psych.dump(obj), symbolize_names: true)
|
||||
|
||||
assert(PsychCustomMarshalable === loaded)
|
||||
assert_equal(2, loaded.foo)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue