summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/coverage/lib/coverage.rb2
-rw-r--r--test/coverage/test_coverage.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/coverage/lib/coverage.rb b/ext/coverage/lib/coverage.rb
index 7a6ef0e1002..f1923ef366c 100644
--- a/ext/coverage/lib/coverage.rb
+++ b/ext/coverage/lib/coverage.rb
@@ -6,7 +6,7 @@ module Coverage
iseqs = [RubyVM::InstructionSequence.compile_file(file)]
until iseqs.empty?
iseq = iseqs.pop
- iseq.trace_points.each {|n, _| lines[n - 1] = 0 }
+ iseq.trace_points.each {|n, type| lines[n - 1] = 0 if type == :line }
iseq.each_child {|child| iseqs << child }
end
lines
diff --git a/test/coverage/test_coverage.rb b/test/coverage/test_coverage.rb
index 12408330888..d2a2d018a95 100644
--- a/test/coverage/test_coverage.rb
+++ b/test/coverage/test_coverage.rb
@@ -671,7 +671,7 @@ class TestCoverage < Test::Unit::TestCase
f.puts "end"
end
- assert_equal([0, 0, 0, nil, 0, nil, 0], Coverage.line_stub("test.rb"))
+ assert_equal([0, 0, 0, nil, 0, nil, nil], Coverage.line_stub("test.rb"))
}
}
end