diff options
author | Xavier Noria <fxn@hashref.com> | 2010-10-15 16:31:00 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-10-15 16:31:00 +0200 |
commit | 21ff8849bb7d4f1c277d767c7704eb63d8920cc7 (patch) | |
tree | 5e6b8d278ef14d0ab0089238bbce61bad5423b32 /railties | |
parent | c42ea2172eb977538cda076942d69eb90e090a26 (diff) | |
download | rails-21ff8849bb7d4f1c277d767c7704eb63d8920cc7.tar.gz rails-21ff8849bb7d4f1c277d767c7704eb63d8920cc7.tar.bz2 rails-21ff8849bb7d4f1c277d767c7704eb63d8920cc7.zip |
in regexps, the dot in a character class is not a metacharacter
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/backtrace_cleaner.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/engine.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/backtrace_cleaner.rb b/railties/lib/rails/backtrace_cleaner.rb index bedefaa51c..36fd9aea19 100644 --- a/railties/lib/rails/backtrace_cleaner.rb +++ b/railties/lib/rails/backtrace_cleaner.rb @@ -22,7 +22,7 @@ module Rails gems_paths = (Gem.path + [Gem.default_dir]).uniq.map!{ |p| Regexp.escape(p) } return if gems_paths.empty? - gems_regexp = %r{(#{gems_paths.join('|')})/gems/([^/]+)-([\w\.]+)/(.*)} + gems_regexp = %r{(#{gems_paths.join('|')})/gems/([^/]+)-([\w.]+)/(.*)} add_filter { |line| line.sub(gems_regexp, '\2 (\3) \4') } end end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 25ca8c4758..5fb9cc1825 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -336,7 +336,7 @@ module Rails base.called_from = begin # Remove the line number from backtraces making sure we don't leave anything behind call_stack = caller.map { |p| p.split(':')[0..-2].join(':') } - File.dirname(call_stack.detect { |p| p !~ %r[railties[\w\-\.]*/lib/rails|rack[\w\-\.]*/lib/rack] }) + File.dirname(call_stack.detect { |p| p !~ %r[railties[\w.-]*/lib/rails|rack[\w.-]*/lib/rack] }) end end |