aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module/delegation.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-07-18 00:22:12 +0100
committerJon Leighton <j@jonathanleighton.com>2011-07-18 00:22:26 +0100
commitfcbde454f673a2b393942b09f855a4febcf331fa (patch)
treee236d6b30d1606b15ff07fcebb1375dc451b6b47 /activesupport/lib/active_support/core_ext/module/delegation.rb
parente9bd83402ed1ab86e70c9ec6ffc913b72fd41f1d (diff)
downloadrails-fcbde454f673a2b393942b09f855a4febcf331fa.tar.gz
rails-fcbde454f673a2b393942b09f855a4febcf331fa.tar.bz2
rails-fcbde454f673a2b393942b09f855a4febcf331fa.zip
Don't do remove_possible_method when delegate is used. Two reasons: 1) warnings should be shown, and fixed at the source and 2) the code is slow. Fixes #1937.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module/delegation.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/module/delegation.rb4
1 files changed, 0 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb
index 1777a4b32d..41f9a76b13 100644
--- a/activesupport/lib/active_support/core_ext/module/delegation.rb
+++ b/activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -127,10 +127,6 @@ class Module
end
module_eval(<<-EOS, file, line - 5)
- if instance_methods(false).map(&:to_s).include?("#{prefix}#{method}")
- remove_possible_method("#{prefix}#{method}")
- end
-
def #{prefix}#{method}(*args, &block) # def customer_name(*args, &block)
#{to}.__send__(#{method.inspect}, *args, &block) # client.__send__(:name, *args, &block)
rescue NoMethodError # rescue NoMethodError