From c48ef0082c21118f63a329d2b7bef54192c63a85 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 7 Dec 2006 15:15:05 +0000 Subject: * lib/weakref.rb (WeakRef::__setobj__): should support marshaling. [ruby-talk:228508] * lib/delegate.rb (Delegator::marshal_load): need to call __setobj__. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@11363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ lib/delegate.rb | 1 + lib/weakref.rb | 30 ++++++++++++++++++------------ 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ca9b0dc9..773be8af7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Dec 7 09:29:02 2006 Yukihiro Matsumoto + + * lib/weakref.rb (WeakRef::__setobj__): should support + marshaling. [ruby-talk:228508] + + * lib/delegate.rb (Delegator::marshal_load): need to call + __setobj__. + Wed Dec 6 23:56:14 2006 Nobuyoshi Nakada * Makefile.in, common.mk (NULLCMD): moved for platforms that empty diff --git a/lib/delegate.rb b/lib/delegate.rb index 93c9803a1..d810ccad4 100644 --- a/lib/delegate.rb +++ b/lib/delegate.rb @@ -184,6 +184,7 @@ class Delegator # Reinitializes delegation from a serialized object. def marshal_load(obj) initialize_methods(obj) + __setobj__(obj) end end diff --git a/lib/weakref.rb b/lib/weakref.rb index 7d43f7126..591819c94 100644 --- a/lib/weakref.rb +++ b/lib/weakref.rb @@ -48,18 +48,7 @@ class WeakRef