diff options
author | Xavier Noria <fxn@hashref.com> | 2010-08-26 14:26:42 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-26 14:26:42 +0200 |
commit | c1b5e2a2d5a59eebe017f63088b9478b7151d6d2 (patch) | |
tree | 1ff41d8b9c9060cc7f168b38bc07b220ca2e715f /activesupport | |
parent | 0f9eedf6de72f4afacde6d7075c588a7a6fd3ad6 (diff) | |
parent | e72406e2ba3cd3a5d72fea6219f152640e2e7479 (diff) | |
download | rails-c1b5e2a2d5a59eebe017f63088b9478b7151d6d2.tar.gz rails-c1b5e2a2d5a59eebe017f63088b9478b7151d6d2.tar.bz2 rails-c1b5e2a2d5a59eebe017f63088b9478b7151d6d2.zip |
Merge remote branch 'rails/master'
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/inflections.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/deprecation/reporting.rb | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index 9a4e63672f..55b24b0925 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -1,5 +1,7 @@ require 'active_support/inflector/methods' require 'active_support/inflector/inflections' +require 'active_support/inflector/transliterate' + # String inflections define new methods on the String class to transform names for different purposes. # For instance, you can figure out the name of a database from the name of a class. # diff --git a/activesupport/lib/active_support/deprecation/reporting.rb b/activesupport/lib/active_support/deprecation/reporting.rb index 49d58cd3a1..6a7b11c7e0 100644 --- a/activesupport/lib/active_support/deprecation/reporting.rb +++ b/activesupport/lib/active_support/deprecation/reporting.rb @@ -46,10 +46,14 @@ module ActiveSupport 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 |