lib/pdk/report/event.rb
def sanitise_trace(value)
        return nil if value.nil?

        valid_types = [Array]

        unless valid_types.include?(value.class)
          raise ArgumentError, _('Trace must be an Array of stack trace lines.')
        end

        # Drop any stacktrace lines that include '/gems/' in the path or
        # are the original rspec binstub lines
        value.reject do |line|
          (line =~ %r{/gems/}) || (line =~ %r{bin/rspec:})
        end
      end
# Cleans up provided stack trace by removing entries that are inside gems
# or the rspec binstub.
#
# @param value [Array] Array of stack trace lines
#
# @return [Array] Array of stack trace lines with less relevant lines excluded
Cleans up provided stack trace by removing entries that are inside gems
or the rspec binstub.
Cleans up provided stack trace by removing entries that are inside gems or the rspec binstub .
def sanitise_trace(value)
        return nil if value.nil?
        valid_types = [Array]
        unless valid_types.include?(value.class)
          raise ArgumentError, _('Trace must be an Array of stack trace lines.')
        end
        value.reject do |line|
          (line =~ %r{/gems/}) || (line =~ %r{bin/rspec:})
        end
      end
def sanitise_trace ( value ) return nil if value . nil? valid_types = [ Array ] unless valid_types . include? ( value . class ) raise ArgumentError , _ ( 'Trace must be an Array of stack trace lines.' ) end value . reject do | line | ( line =~ %r{ /gems/ } ) || ( line =~ %r{ bin/rspec: } ) end end
Cleans up provided stack trace by removing entries that are inside gems
or the rspec binstub.
Cleans up provided stack trace by removing entries that are inside gems or the rspec binstub .
# Drop any stacktrace lines that include '/gems/' in the path or # are the original rspec binstub lines
Array of stack trace lines with less relevant lines excluded
Array of stack trace lines with less relevant lines excluded
Array
value
Array of stack trace lines
Array of stack trace lines