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

ruby-changes:14686

From: nobu <ko1@a...>
Date: Tue, 2 Feb 2010 11:14:22 +0900 (JST)
Subject: [ruby-changes:14686] Ruby:r26539 (trunk): * lib/delegate.rb (Delegator#marshal_dump): exclude

nobu	2010-02-02 11:14:00 +0900 (Tue, 02 Feb 2010)

  New Revision: 26539

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26539

  Log:
    * lib/delegate.rb (Delegator#marshal_dump): exclude
      delegator-specific instance variables.

  Modified files:
    trunk/ChangeLog
    trunk/lib/delegate.rb
    trunk/version.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26538)
+++ ChangeLog	(revision 26539)
@@ -1,3 +1,8 @@
+Tue Feb  2 11:13:56 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/delegate.rb (Delegator#marshal_dump): exclude
+	  delegator-specific instance variables.
+
 Mon Feb  1 21:26:41 2010  Yusuke Endoh  <mame@t...>
 
 	* lib/matrix.rb (Vector#each2): returns a self.  [ruby-dev:40241]
Index: lib/delegate.rb
===================================================================
--- lib/delegate.rb	(revision 26538)
+++ lib/delegate.rb	(revision 26539)
@@ -183,10 +183,10 @@
 
   # Serialization support for the object returned by \_\_getobj\_\_.
   def marshal_dump
+    ivars = instance_variables.reject {|var| /\A@delegate_/ =~ var}
     [
       :__v2__,
-      instance_variables,
-      instance_variables.map{|var| instance_variable_get(var)},
+      ivars, ivars.map{|var| instance_variable_get(var)},
       __getobj__
     ]
   end
Index: version.h
===================================================================
--- version.h	(revision 26538)
+++ version.h	(revision 26539)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2010-02-01"
+#define RUBY_RELEASE_DATE "2010-02-02"
 #define RUBY_PATCHLEVEL -1
 #define RUBY_BRANCH_NAME "trunk"
 
@@ -8,7 +8,7 @@
 #define RUBY_VERSION_TEENY 1
 #define RUBY_RELEASE_YEAR 2010
 #define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 1
+#define RUBY_RELEASE_DAY 2
 
 #include "ruby/version.h"
 

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

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