1. Michael Granger
  2. rspec-formatter-webkit

Commits

Michael Granger  committed 2ff3592 Merge

Merge pull request #3 from cfabianski/protect_file_expand_path

Protect the File.expand_path if $1 is nil

  • Participants
  • Parent commits 5aff2e5, cfb2d16
  • Branches default

Comments (0)

Files changed (1)

File lib/rspec/core/formatters/webkit.rb

View file
  • Ignore whitespace
 		return nil unless line = super
 		return nil if line =~ BACKTRACE_EXCLUDE_PATTERN
 		return h( line.strip ).gsub( /([^:]*\.rb):(\d*)/ ) do
-			"<a href=\"txmt://open?url=file://#{File.expand_path($1)}&amp;line=#{$2}\">#{$1}:#{$2}</a> "
+			"<a href=\"txmt://open?url=file://#{File.expand_path($1.to_s)}&amp;line=#{$2}\">#{$1}:#{$2}</a> "
 		end
 	end