mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
2 changed files with 11 additions and 0 deletions
|
@ -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>
|
||||
|
||||
* lib/delegate.rb (Delegator#respond_to_missing): warn if optional
|
||||
|
|
|
@ -199,6 +199,12 @@ class Delegator
|
|||
new
|
||||
end
|
||||
|
||||
# Freeze self and target at once.
|
||||
def freeze
|
||||
__getobj__.freeze
|
||||
super
|
||||
end
|
||||
|
||||
@delegator_api = self.public_instance_methods
|
||||
def self.public_api # :nodoc:
|
||||
@delegator_api
|
||||
|
|
Loading…
Reference in a new issue