ruby-changes:14366
From: marcandre <ko1@a...>
Date: Tue, 29 Dec 2009 11:21:23 +0900 (JST)
Subject: [ruby-changes:14366] Ruby:r26196 (ruby_1_8): * lib/delegate.rb (marshal_dump/load): Revert r26122, r26194, as per Nobu.
marcandre 2009-12-29 11:21:11 +0900 (Tue, 29 Dec 2009) New Revision: 26196 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26196 Log: * lib/delegate.rb (marshal_dump/load): Revert r26122, r26194, as per Nobu. [ruby-core:24211] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/lib/delegate.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 26195) +++ ruby_1_8/ChangeLog (revision 26196) @@ -1,3 +1,8 @@ +Tue Dec 29 11:20:41 2009 Marc-Andre Lafortune <ruby-core@m...> + + * lib/delegate.rb (marshal_dump/load): Revert r26122, r26194, as per + Nobu. [ruby-core:24211] + Tue Dec 29 10:36:23 2009 Nobuyoshi Nakada <nobu@r...> * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::STANDALONE): Index: ruby_1_8/lib/delegate.rb =================================================================== --- ruby_1_8/lib/delegate.rb (revision 26195) +++ ruby_1_8/lib/delegate.rb (revision 26196) @@ -178,22 +178,12 @@ # Serialization support for the object returned by \_\_getobj\_\_. def marshal_dump - [ - :__v2__, - instance_variables, - instance_variables.map{|var| instance_variable_get(var)}, - __getobj__ - ] + __getobj__ end # Reinitializes delegation from a serialized object. - def marshal_load(data) - version, vars, values, obj = data - if version == :__v2__ - vars.each_with_index{|var, i| instance_variable_set(var, values[i])} - __setobj__(obj) - else - __setobj__(data) - end + def marshal_load(obj) + initialize_methods(obj) + __setobj__(obj) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/