Flowdock
method

add_gem_filter

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: ActiveSupport::BacktraceCleaner
add_gem_filter() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 91
      def add_gem_filter
        gems_paths = (Gem.path | [Gem.default_dir]).map { |p| Regexp.escape(p) }
        return if gems_paths.empty?

        gems_regexp = %{(#{gems_paths.join('|')})/(bundler/)?gems/([^/]+)-([\w.]+)/(.*)}
        gems_result = '\3 (\4) \5'
        add_filter { |line| line.sub(gems_regexp, gems_result) }
      end
Register or log in to add new notes.