summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2021-02-11 18:30:58 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-05-10 19:17:32 +0900
commitc110ade0d235391c2fbfe9291250f744b735a1a8 (patch)
treefcda2db839e3567ae8e2c99130a5adf122e5a4d0 /test
parent155cd7fd2a4d5d3a732f73d42385048e16dfbc23 (diff)
[ruby/psych] Fix custom marshalization with symbolize_names: true
https://github.com/ruby/psych/commit/ee26f26ab5
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_marshalable.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/psych/test_marshalable.rb b/test/psych/test_marshalable.rb
index b1f4a837f5..152cc4e11f 100644
--- a/test/psych/test_marshalable.rb
+++ b/test/psych/test_marshalable.rb
@@ -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