about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-03-13 21:46:27 +0000
committerEric Wong <normalperson@yhbt.net>2014-03-13 21:50:12 +0000
commitce2e7d581f164a81ba5d248b730924d50e9ff3c7 (patch)
treedb9731fd6e74745e5ba17f560ebf68bcb84fa86e /test
parenta6914a1d675abf5e90258b2517d519984b38218a (diff)
downloaddtas-ce2e7d581f164a81ba5d248b730924d50e9ff3c7.tar.gz
There's a feature request for better coverage support in ruby-trunk
https://bugs.ruby-lang.org/issues/9508
At minimum, we need to preserve compatibility; but we should set
aside time to take advantage of the extra coverage support.
Diffstat (limited to 'test')
-rw-r--r--test/helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/helper.rb b/test/helper.rb
index 7dde383..9d8c256 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -25,6 +25,12 @@ if ENV["COVERAGE"]
       # filter out stuff that's not in our project
       COVMATCH =~ filename or next
 
+      # For compatibility with https://bugs.ruby-lang.org/issues/9508
+      # TODO: support those features if that gets merged into mainline
+      unless Array === counts
+        counts = counts[:lines]
+      end
+
       merge = prev[filename] || []
       merge = merge
       counts.each_with_index do |count, i|