summaryrefslogtreecommitdiff
path: root/lib/delegate.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-01 14:11:50 +0900
committergit <svn-admin@ruby-lang.org>2022-12-01 08:08:02 +0000
commita1d341efaf0b357e7aad3700ed7551559b4fcdf8 (patch)
treec4461250e45ce5b394ad172458c283d26dcf3cb9 /lib/delegate.rb
parent4e68b594314760611d0926c3de70a4cad26802cd (diff)
[ruby/delegate] Revert "Fix `DelegateClass` block "method redefined" warning"
https://github.com/ruby/delegate/commit/2a91436284
Diffstat (limited to 'lib/delegate.rb')
-rw-r--r--lib/delegate.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/delegate.rb b/lib/delegate.rb
index af95c866f3..70d4e4ad1d 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -412,12 +412,10 @@ def DelegateClass(superclass, &block)
end
protected_instance_methods.each do |method|
define_method(method, Delegator.delegating_block(method))
- alias_method(method, method)
protected method
end
public_instance_methods.each do |method|
define_method(method, Delegator.delegating_block(method))
- alias_method(method, method)
end
end
klass.define_singleton_method :public_instance_methods do |all=true|