lib/active_support/deprecation/reporting.rb in activesupport-3.0.0.rc2 vs lib/active_support/deprecation/reporting.rb in activesupport-3.0.0

- old
+ new

@@ -44,13 +44,17 @@ end end end def extract_callstack(callstack) - if md = callstack.first.match(/^(.+?):(\d+)(?::in `(.*?)')?/) - md.captures - else - callstack.first + rails_gem_root = File.expand_path("../../../../..", __FILE__) + "/" + offending_line = callstack.find { |line| !line.start_with?(rails_gem_root) } || callstack.first + if offending_line + if md = offending_line.match(/^(.+?):(\d+)(?::in `(.*?)')?/) + md.captures + else + offending_line + end end end end end end