sam.rawlins / gmail.com wrote:
> Hi Eric, great find! It turns out the bug here was when requiring Shared Objects (etc.so in this case). I've fixed that in the last commit. Cumulative patch available at the pull request:
> 
> https://github.com/ruby/ruby/pull/511.patch

Thanks.  I just tried it with dtas[1] (which has a text-only coverage
displayer) and realized it's not compatible with the existing
Coverage.result.

I guess this breaks existing, widely-used coverage tools like simplecov,
too?

How about keeping Coverage.result the same, and allowing
Coverage.result2 or maybe Coverage.result(:all)?

I'm excited about this feature, but we should try to not break
existing tools.


Another thing I noticed with your latest fix:
  You call rb_hash_lookup(coverages, path) 3 times more than you
  need to.  I don't know if there's a measurable speed difference,
  but it's still ugly (and yeah, I just spent a fair amount of time
  trying to eek out the last bit of hash lookup performance in #9425).


[1] git clone git://80x24.org/dtas
    cd dtas
    cat test/helper.rb
    cat test/covshow.rb
    make coverage # (needs sox/flac/mp3gain installed, at least)