module Cucumber::Core::Test::Location
def self.from_source_location(file, line)
def self.from_source_location(file, line) file = File.expand_path(file) pwd = File.expand_path(Dir.pwd) pwd.force_encoding(file.encoding) if file.index(pwd) file = file[pwd.length+1..-1] elsif file =~ /.*\/gems\/(.*\.rb)$/ file = $1 end new(file, line) end