summaryrefslogtreecommitdiff
path: root/test/psych/test_marshalable.rb
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2021-02-24 09:01:32 -0800
committerGitHub <noreply@github.com>2021-02-24 09:01:32 -0800
commit8c3afaa0a3db2f3afc187e91886adf278e8e0190 (patch)
tree38c77ed6644c227b1ac00ffdfac5c527b2dfdd0c /test/psych/test_marshalable.rb
parenta88ff77f02bafafabfc6df9d159141bca2ae0217 (diff)
parentee26f26ab5e39eec402ea01109b9ba736d06b5b6 (diff)
downloadpsych-8c3afaa0a3db2f3afc187e91886adf278e8e0190.zip
Merge pull request #476 from Shopify/symbolize-name-ruby-object
Fix custom marshalization with symbolize_names: true
Diffstat (limited to 'test/psych/test_marshalable.rb')
-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 b1f4a83..152cc4e 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