lib/docrb/spec/fixtures/logrb.rb
def normalize_location(trace, include_function_name: false)
    path = trace.absolute_path
    return trace.to_s if path.nil?

    if (root = Gem.path.find { |p| path.start_with?(p) })
      path = "$GEM_PATH#{path[root.length..]}"
    end
    "#{path}:#{trace.lineno}#{include_function_name ? " in `#{trace.label}'" : ""}"
  end
# Internal: Performs a cleanup for a given backtrace frame.
#
# trace - Trace to be clean.
# include_function_name - Optional. When true, includes the function name
#   on the normalized string. Defaults to false.
Performs a cleanup for a given backtrace frame.
trace - Trace to be clean.
Performs a cleanup for a given backtrace frame . trace - Trace to be clean .
def normalize_location(trace, include_function_name: false)
    path = trace.absolute_path
    return trace.to_s if path.nil?
    if (root = Gem.path.find { |p| path.start_with?(p) })
      path = "$GEM_PATH#{path[root.length..]}"
    end
    "#{path}:#{trace.lineno}#{include_function_name ? " in `#{trace.label}'" : ""}"
  end
def normalize_location ( trace , include_function_name : false ) path = trace . absolute_path return trace . to_s if path . nil? if ( root = Gem . path . find { | p | path . start_with? ( p ) } ) path = "$GEM_PATH#{path[root.length..]}" end "#{path}:#{trace.lineno}#{include_function_name ? " in `#{trace.label}'" : ""}" end
Internal: Performs a cleanup for a given backtrace frame.
Internal : Performs a cleanup for a given backtrace frame .
trace
include_function_name