mirror of https://github.com/rails/rails
Merge pull request #5708 from romanvbabenko/refactor/add_gem_filters
Unnecessary uniqueness & force mapping has been removed at BacktraceClea...
This commit is contained in:
commit
a3dc8ba16f
|
@ -19,7 +19,7 @@ module Rails
|
|||
def add_gem_filters
|
||||
return unless defined?(Gem)
|
||||
|
||||
gems_paths = (Gem.path + [Gem.default_dir]).uniq.map!{ |p| Regexp.escape(p) }
|
||||
gems_paths = (Gem.path | [Gem.default_dir]).map { |p| Regexp.escape(p) }
|
||||
return if gems_paths.empty?
|
||||
|
||||
gems_regexp = %r{(#{gems_paths.join('|')})/gems/([^/]+)-([\w.]+)/(.*)}
|
||||
|
|
Loading…
Reference in New Issue