From fcbde454f673a2b393942b09f855a4febcf331fa Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Mon, 18 Jul 2011 00:22:12 +0100 Subject: 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. --- activesupport/lib/active_support/core_ext/module/delegation.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/module/delegation.rb') 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 -- cgit v1.2.3