diff options
Diffstat (limited to 'sample/coverage.rb')
| -rw-r--r-- | sample/coverage.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sample/coverage.rb b/sample/coverage.rb index 5e15f99716..42ba89fd50 100644 --- a/sample/coverage.rb +++ b/sample/coverage.rb @@ -17,7 +17,7 @@ at_exit do File.writable?(f) || File.writable?(File.dirname(f)) end unless writable[cfile] - cfile = cfile.gsub(File.PATH_SEPARATOR, "#") + cfile = cfile.gsub(File::PATH_SEPARATOR, "#") next unless writable[cfile] end @@ -38,7 +38,7 @@ at_exit do end cov else - p line + p line warn("coverage file corrupted, ignoring: #{ cfile }") break [] end @@ -49,7 +49,7 @@ at_exit do end end - open(cfile, "w") do |out| + File.open(cfile, "w") do |out| covs.zip(sources, pcovs).each_with_index do |(cov, line, pcov), idx| cov += pcov || 0 if cov cov = (cov ? (cov == 0 ? "#####" : cov.to_s) : "-").rjust(9) |
