class Proc

:nodoc:

def backtrace_line(name)

def backtrace_line(name)
  "#{file_colon_line}:in `#{name}'"
end

def file_colon_line

def file_colon_line
  path, line = *to_s.match(PROC_PATTERN)[1..2]
  path = File.expand_path(path)
  pwd = File.expand_path(PWD)
  pwd.force_encoding(path.encoding) unless Cucumber::RUBY_1_8_7
  if path.index(pwd)
    path = path[pwd.length+1..-1]
  elsif path =~ /.*\/gems\/(.*\.rb)$/
    path = $1
  end
  "#{path}:#{line}"
end

def file_colon_line

def file_colon_line
  "UNKNOWN:-1"
end

def to_comment_line

def to_comment_line
  "# #{file_colon_line}"
end