summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-25 10:27:07 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-25 10:27:07 +0000
commitca8b2d26f03b5bb5e71a0de6bab1580b6326fe14 (patch)
tree247305d6c4da35c3efbc16120ffdcff258d39286 /test
parent63b34adea2eb7af969f7523d34a72427b8b8dbde (diff)
merge revision(s) 53609: [Backport #12011]
* marshal.c (r_object0): honor Marshal.load post proc value for TYPE_LINK. by Hiroshi Nakamura <nahi@ruby-lang.org> https://github.com/ruby/ruby/pull/1204 fix GH-1204 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@53934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_marshal.rb6
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