diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-04 12:45:03 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-04 12:45:03 +0000 |
commit | 804e475b666c2f46ff4e484a2b869f44cbfa7c0b (patch) | |
tree | a96d7e1dc65688bc4e6f50651bb67be772bef1e2 /lib | |
parent | 8141083006da043e6ea614e56514dd9c7d7e87ad (diff) | |
download | ruby-804e475b666c2f46ff4e484a2b869f44cbfa7c0b.tar.gz |
* lib/delegate.rb (marshal_dump, marshal_load: defined for Marshal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/delegate.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/delegate.rb b/lib/delegate.rb index 651164e274..578859fdc6 100644 --- a/lib/delegate.rb +++ b/lib/delegate.rb @@ -51,6 +51,12 @@ class Delegator raise NotImplementedError, "need to define `__getobj__'" end + def marshal_dump + __getobj__ + end + def marshal_load(obj) + initialize(obj) + end end class SimpleDelegator<Delegator |