[前][次][番号順一覧][スレッド一覧]

ruby-changes:42283

From: naruse <ko1@a...>
Date: Tue, 29 Mar 2016 14:32:49 +0900 (JST)
Subject: [ruby-changes:42283] naruse:r54357 (ruby_2_3): merge revision(s) 53609: [Backport #12011]

naruse	2016-03-29 14:32:43 +0900 (Tue, 29 Mar 2016)

  New Revision: 54357

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54357

  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_3/
  Modified files:
    branches/ruby_2_3/ChangeLog
    branches/ruby_2_3/marshal.c
    branches/ruby_2_3/test/ruby/test_marshal.rb
    branches/ruby_2_3/version.h
Index: ruby_2_3/marshal.c
===================================================================
--- ruby_2_3/marshal.c	(revision 54356)
+++ ruby_2_3/marshal.c	(revision 54357)
@@ -1569,7 +1569,7 @@ r_object0(struct load_arg *arg, int *ivp https://github.com/ruby/ruby/blob/trunk/ruby_2_3/marshal.c#L1569
 	    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:
Index: ruby_2_3/test/ruby/test_marshal.rb
===================================================================
--- ruby_2_3/test/ruby/test_marshal.rb	(revision 54356)
+++ ruby_2_3/test/ruby/test_marshal.rb	(revision 54357)
@@ -712,4 +712,10 @@ class TestMarshal < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/ruby/test_marshal.rb#L712
     assert_predicate(status, :success?)
     assert_equal(expected, out)
   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_3/ChangeLog
===================================================================
--- ruby_2_3/ChangeLog	(revision 54356)
+++ ruby_2_3/ChangeLog	(revision 54357)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1
+Tue Mar 29 14:22:57 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
+
 Tue Mar 29 14:18:26 2016  SHIBATA Hiroshi  <hsbt@r...>
 
 	* .travis.yml: removed commented-out code.
Index: ruby_2_3/version.h
===================================================================
--- ruby_2_3/version.h	(revision 54356)
+++ ruby_2_3/version.h	(revision 54357)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1
 #define RUBY_VERSION "2.3.0"
 #define RUBY_RELEASE_DATE "2016-03-29"
-#define RUBY_PATCHLEVEL 15
+#define RUBY_PATCHLEVEL 16
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 3

Property changes on: ruby_2_3
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r53609


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]