From 6edc26f47e10c57b1a15f14452c31d637590d7b2 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 1 Dec 2014 12:35:16 +1100 Subject: FIX: absolute_path may be nil for code added via instance_eval --- railties/lib/rails/engine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties') 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+.*/, '') } -- cgit v1.2.3