diff options
author | Sam <sam.saffron@gmail.com> | 2014-12-01 12:35:16 +1100 |
---|---|---|
committer | Sam <sam.saffron@gmail.com> | 2014-12-01 12:35:16 +1100 |
commit | 6edc26f47e10c57b1a15f14452c31d637590d7b2 (patch) | |
tree | 3cbe793937bbb6d664d48ac351d6f5ec80591213 /railties/lib | |
parent | 6874133f9e5ca79f30f43632da4338d7b82ddeff (diff) | |
download | rails-6edc26f47e10c57b1a15f14452c31d637590d7b2.tar.gz rails-6edc26f47e10c57b1a15f14452c31d637590d7b2.tar.bz2 rails-6edc26f47e10c57b1a15f14452c31d637590d7b2.zip |
FIX: absolute_path may be nil for code added via instance_eval
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/engine.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 4b7da32208..b579f70983 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -351,7 +351,7 @@ module Rails base.called_from = begin call_stack = if Kernel.respond_to?(:caller_locations) - caller_locations.map(&:absolute_path) + caller_locations.map { |l| l.absolute_path || l.path } else # Remove the line number from backtraces making sure we don't leave anything behind caller.map { |p| p.sub(/:\d+.*/, '') } |