Permalink
Browse files

SimpleCov chokes unless kernel files have absolute paths.

  • Loading branch information...
1 parent 71a4094 commit 2acbc7d9a658709346c91129b4bb5cdc1a584749 @brixen brixen committed Sep 12, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/19/coverage.rb
View
@@ -13,6 +13,8 @@ def self.result
map = @coverage_tool.stop.results
+ kernel = File.dirname Rubinius::KERNEL_PATH
+
coverage = Hash.new { |h, k| h[k] = [] }
map.each do |id, attr|
@@ -22,6 +24,7 @@ def self.result
file = code.file.to_s
next if file[0] == ?(
+ file = File.join kernel, file unless file[0] == ?/
code.lines.to_a.drop(1).each_slice(2) do |line, _|
next unless line > 0

0 comments on commit 2acbc7d

Please sign in to comment.