ruby-changes:41860
From: usa <ko1@a...>
Date: Thu, 25 Feb 2016 19:26:25 +0900 (JST)
Subject: [ruby-changes:41860] usa:r53934 (ruby_2_1): merge revision(s) 53609: [Backport #12011]
usa 2016-02-25 19:27:07 +0900 (Thu, 25 Feb 2016) New Revision: 53934 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53934 Log: merge revision(s) 53609: [Backport #12011] * marshal.c (r_object0): honor Marshal.load post proc value for TYPE_LINK. by Hiroshi Nakamura <nahi@r...> https://github.com/ruby/ruby/pull/1204 fix GH-1204 Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/ChangeLog branches/ruby_2_1/marshal.c branches/ruby_2_1/test/ruby/test_marshal.rb branches/ruby_2_1/version.h Index: ruby_2_1/ChangeLog =================================================================== --- ruby_2_1/ChangeLog (revision 53933) +++ ruby_2_1/ChangeLog (revision 53934) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1 +Thu Feb 25 19:25:25 2016 NARUSE, Yui <naruse@r...> + + * marshal.c (r_object0): honor Marshal.load post proc + value for TYPE_LINK. by Hiroshi Nakamura <nahi@r...> + https://github.com/ruby/ruby/pull/1204 fix GH-1204 + Thu Feb 25 18:59:27 2016 Nobuyoshi Nakada <nobu@r...> * ext/socket/option.c (sockopt_bool): relax boolean size to be one Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 53933) +++ ruby_2_1/version.h (revision 53934) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.9" #define RUBY_RELEASE_DATE "2016-02-25" -#define RUBY_PATCHLEVEL 452 +#define RUBY_PATCHLEVEL 453 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 2 Index: ruby_2_1/test/ruby/test_marshal.rb =================================================================== --- ruby_2_1/test/ruby/test_marshal.rb (revision 53933) +++ ruby_2_1/test/ruby/test_marshal.rb (revision 53934) @@ -606,4 +606,10 @@ class TestMarshal < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/ruby/test_marshal.rb#L606 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 Index: ruby_2_1/marshal.c =================================================================== --- ruby_2_1/marshal.c (revision 53933) +++ ruby_2_1/marshal.c (revision 53934) @@ -1499,7 +1499,7 @@ r_object0(struct load_arg *arg, int *ivp https://github.com/ruby/ruby/blob/trunk/ruby_2_1/marshal.c#L1499 rb_raise(rb_eArgError, "dump format error (unlinked)"); } v = (VALUE)link; - r_post_proc(v, arg); + v = r_post_proc(v, arg); break; case TYPE_IVAR: Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r53609 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/