mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
8141083006
commit
804e475b66
1 changed files with 6 additions and 0 deletions
|
@ -51,6 +51,12 @@ class Delegator
|
||||||
raise NotImplementedError, "need to define `__getobj__'"
|
raise NotImplementedError, "need to define `__getobj__'"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def marshal_dump
|
||||||
|
__getobj__
|
||||||
|
end
|
||||||
|
def marshal_load(obj)
|
||||||
|
initialize(obj)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class SimpleDelegator<Delegator
|
class SimpleDelegator<Delegator
|
||||||
|
|
Loading…
Add table
Reference in a new issue