From ce2e7d581f164a81ba5d248b730924d50e9ff3c7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 13 Mar 2014 21:46:27 +0000 Subject: test/helper: compat w/ coverage in Feature #9508 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. --- test/helper.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') 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| -- cgit v1.2.3-24-ge0c7