Skip to content

Commit

Permalink
SimpleCov chokes unless kernel files have absolute paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Sep 13, 2012
1 parent 71a4094 commit 2acbc7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/19/coverage.rb
Expand Up @@ -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|
Expand All @@ -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
Expand Down

0 comments on commit 2acbc7d

Please sign in to comment.