diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-08-15 12:50:57 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-08-15 13:03:28 +0100 |
commit | 63d100ea35a7fabea25c37f654177c3828fc1dcb (patch) | |
tree | e6e0800b7f36fc597f9d2f034c87bcda73a51482 /activesupport/lib/active_support/core_ext | |
parent | 7b56fb034a2f9a03ccbdc485287946b49e5e9b68 (diff) | |
download | rails-63d100ea35a7fabea25c37f654177c3828fc1dcb.tar.gz rails-63d100ea35a7fabea25c37f654177c3828fc1dcb.tar.bz2 rails-63d100ea35a7fabea25c37f654177c3828fc1dcb.zip |
Fix the line number in the backtrace when Module#delegate raises
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/delegation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb index 8655288bc3..654e3a01c6 100644 --- a/activesupport/lib/active_support/core_ext/module/delegation.rb +++ b/activesupport/lib/active_support/core_ext/module/delegation.rb @@ -133,7 +133,7 @@ class Module %(raise "#{self}##{method_prefix}#{method} delegated to #{to}.#{method}, but #{to} is nil: \#{self.inspect}") end - module_eval(<<-EOS, file, line - 5) + module_eval(<<-EOS, file, line - 1) def #{method_prefix}#{method}(*args, &block) # def customer_name(*args, &block) #{to}.#{call}*args, &block) # client.name(*args, &block) rescue NoMethodError # rescue NoMethodError |