summaryrefslogtreecommitdiff
path: root/lib/delegate.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/delegate.rb')
-rw-r--r--lib/delegate.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/delegate.rb b/lib/delegate.rb
index 70d4e4ad1d..af95c866f3 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -412,10 +412,12 @@ 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|