summaryrefslogtreecommitdiff
path: root/lib/coverage.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coverage.rb')
-rw-r--r--lib/coverage.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/coverage.rb b/lib/coverage.rb
index f72473ece3..1a405355ff 100644
--- a/lib/coverage.rb
+++ b/lib/coverage.rb
@@ -1,4 +1,5 @@
-COVERAGE__ ||= {}
+require "coverage.so"
+
ext = ENV["COVERUBY_EXT"] || ".cov"
accum = ENV["COVERUBY_ACCUM"]
accum = !accum || accum == "" || !(%w(f n 0).include?(accum[0]))
@@ -6,7 +7,7 @@ pwd = Dir.pwd
at_exit do
Dir.chdir(pwd) do
- COVERAGE__.each do |sfile, covs|
+ Coverage.result.each do |sfile, covs|
cfile = sfile + ext
writable = proc do |f|