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

ruby-changes:41994

From: nagachika <ko1@a...>
Date: Wed, 9 Mar 2016 22:58:44 +0900 (JST)
Subject: [ruby-changes:41994] nagachika:r54068 (ruby_2_2): merge revision(s) 53609: [Backport #12011]

nagachika	2016-03-09 22:58:39 +0900 (Wed, 09 Mar 2016)

  New Revision: 54068

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

  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_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/marshal.c
    branches/ruby_2_2/test/ruby/test_marshal.rb
    branches/ruby_2_2/version.h
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 54067)
+++ ruby_2_2/version.h	(revision 54068)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.5"
 #define RUBY_RELEASE_DATE "2016-03-09"
-#define RUBY_PATCHLEVEL 251
+#define RUBY_PATCHLEVEL 252
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_2/marshal.c
===================================================================
--- ruby_2_2/marshal.c	(revision 54067)
+++ ruby_2_2/marshal.c	(revision 54068)
@@ -1566,7 +1566,7 @@ r_object0(struct load_arg *arg, int *ivp https://github.com/ruby/ruby/blob/trunk/ruby_2_2/marshal.c#L1566
 	    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_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 54067)
+++ ruby_2_2/ChangeLog	(revision 54068)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Wed Mar  9 22:46:56 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
+
 Wed Mar  9 22:26:38 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/socket/option.c (sockopt_bool): relax boolean size to be one
Index: ruby_2_2/test/ruby/test_marshal.rb
===================================================================
--- ruby_2_2/test/ruby/test_marshal.rb	(revision 54067)
+++ ruby_2_2/test/ruby/test_marshal.rb	(revision 54068)
@@ -647,4 +647,10 @@ class TestMarshal < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/ruby/test_marshal.rb#L647
       c.cc.call
     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

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


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

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