From c110ade0d235391c2fbfe9291250f744b735a1a8 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 11 Feb 2021 18:30:58 +0100 Subject: [ruby/psych] Fix custom marshalization with symbolize_names: true https://github.com/ruby/psych/commit/ee26f26ab5 --- test/psych/test_marshalable.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/psych') 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 -- cgit v1.2.3