diff --git a/test/execution_point.rb b/test/execution_point.rb index 33c85699e..5824d2aad 100644 --- a/test/execution_point.rb +++ b/test/execution_point.rb @@ -11,10 +11,12 @@ def initialize(backtrace) end def file_name + return "unknown" unless @backtrace && @backtrace.first /\A(.*?):\d+/.match(@backtrace.first)[1] end def line_number + return "unknown" unless @backtrace && @backtrace.first Integer(/\A.*?:(\d+)/.match(@backtrace.first)[1]) end @@ -24,7 +26,7 @@ def ==(other) end def to_s - "file: #{file_name} line: #{line_number}" + "file: #{file_name}; line: #{line_number}" end def inspect