* lib/delegate.rb (Delegator#freeze): #freeze should freeze self
and the target at once. [ruby-core:26118] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
71689efdd0
commit
749b3aa794
@ -1,3 +1,8 @@
|
|||||||
|
Fri Oct 16 20:09:55 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/delegate.rb (Delegator#freeze): #freeze should freeze self
|
||||||
|
and the target at once. [ruby-core:26118]
|
||||||
|
|
||||||
Fri Oct 16 19:39:28 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Fri Oct 16 19:39:28 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* lib/delegate.rb (Delegator#respond_to_missing): warn if optional
|
* lib/delegate.rb (Delegator#respond_to_missing): warn if optional
|
||||||
|
@ -199,6 +199,12 @@ class Delegator
|
|||||||
new
|
new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Freeze self and target at once.
|
||||||
|
def freeze
|
||||||
|
__getobj__.freeze
|
||||||
|
super
|
||||||
|
end
|
||||||
|
|
||||||
@delegator_api = self.public_instance_methods
|
@delegator_api = self.public_instance_methods
|
||||||
def self.public_api # :nodoc:
|
def self.public_api # :nodoc:
|
||||||
@delegator_api
|
@delegator_api
|
||||||
|
Loading…
x
Reference in New Issue
Block a user