diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-08-21 09:14:58 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-08-21 09:14:58 -0700 |
commit | 6aaa0447b0122e42512180e44b0ba7b47d073895 (patch) | |
tree | 7e7a30b848f6b1e8d696b7c825f96b08356a786f /activesupport/lib | |
parent | 11d1d7ad4dfff7f47867f48c1a1b99f3ee15f89c (diff) | |
parent | cbd2111c67b1603c97c00ebbd5f6f67e4b24eebd (diff) | |
download | rails-6aaa0447b0122e42512180e44b0ba7b47d073895.tar.gz rails-6aaa0447b0122e42512180e44b0ba7b47d073895.tar.bz2 rails-6aaa0447b0122e42512180e44b0ba7b47d073895.zip |
Merge pull request #11850 from razielgn/mod-delegation-backtrace
Generalize backtrace check on DelegationError.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/delegation.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb index bca3800344..182e74d9e1 100644 --- a/activesupport/lib/active_support/core_ext/module/delegation.rb +++ b/activesupport/lib/active_support/core_ext/module/delegation.rb @@ -192,8 +192,7 @@ class Module _ = #{to} # _ = client _.#{method}(#{definition}) # _.name(*args, &block) rescue NoMethodError => e # rescue NoMethodError => e - location = "%s:%d:in `%s'" % [__FILE__, __LINE__ - 2, '#{method_prefix}#{method}'] # location = "%s:%d:in `%s'" % [__FILE__, __LINE__ - 2, 'customer_name'] - if _.nil? && e.backtrace.first == location # if _.nil? && e.backtrace.first == location + if _.nil? && e.name == :#{method} # if _.nil? && e.name == :name #{exception} # # add helpful message to the exception else # else raise # raise |