diff --git a/activesupport/lib/active_support/deprecation/reporting.rb b/activesupport/lib/active_support/deprecation/reporting.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/deprecation/reporting.rb
+++ b/activesupport/lib/active_support/deprecation/reporting.rb
@@ -83,7 +83,7 @@ module ActiveSupport
 
           rails_gem_root = File.expand_path("../../../../..", __FILE__) + "/"
           offending_line = callstack.find { |frame|
-            !frame.absolute_path.start_with?(rails_gem_root)
+            frame.absolute_path && !frame.absolute_path.start_with?(rails_gem_root)
           } || callstack.first
           [offending_line.path, offending_line.lineno, offending_line.label]
         end
Fix deprecation message when frame doesn't have absolute_path

When a frame is an eval block without filename argument there is no
absolute_path so the previous implementation would fail because `nil`
doesn't responds to `start_with?`.