diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_marshal.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 967aa37723..14c49faca3 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -606,4 +606,10 @@ class TestMarshal < Test::Unit::TestCase Marshal.dump(TestForRespondToFalse.new) end end + + def test_marshal_honor_post_proc_value_for_link + str = 'x' # for link + obj = [str, str] + assert_equal(['X', 'X'], Marshal.load(Marshal.dump(obj), ->(v) { v == str ? v.upcase : v })) + end end |