I've opened a set of pull requests that speed up commonly used core methods. This issue collects them in one place for discussion. Each PR stands on its own, adds its benchmark in the first commit, and has its own tests. All of the nu...sferik (Erik Berlin)
A range of single character Strings told that it includes its end even when it is empty, since the end was not compared with the begin. ("z".."a").to_a #=> [] ("z".."a").include?("a") #=> truesferik (Erik Berlin)
@eightbitraptor: Thanks. I previously submitted a nearly identical fix for this in https://github.com/ruby/ruby/pull/19313. CI is already green there.sferik (Erik Berlin)
A Range whose ends are both single ASCII characters reports that it includes its end even when the range is empty. ```ruby r = "z".."a" r.to_a #=> [] r.include?("a") #=> true r.member?("a") #=> true r.cover?("a") #=> ...sferik (Erik Berlin)
I am a maintainer of SimpleCov and working on adding a feature that attributes coverage to individual tests (see https://github.com/simplecov-ruby/simplecov/pull/1277). This feature works by work by diffing `Coverage.peek_result` snapsho...sferik (Erik Berlin)
When the same code is eval'd more than once against the same file path under `Coverage.start(branches: true, eval: true)`, the branch section of `Coverage.result` sometimes contains one condition entry with accumulated arm counts, and so...sferik (Erik Berlin)
`Coverage.line_stub(path)` compiles a file and returns its line coverage array as if the file had been loaded but never run. SimpleCov uses this method to include never-loaded files in a report so that their lines count toward the denomi...sferik (Erik Berlin)
Thanks for the quick response and proposed fix. I left one minor note on your patch but overall it looks good to me. Waiting a month for the Ractor-local GC work is fine. Do you know whether this fix will land in 4.1.0 or a patch rele...sferik (Erik Berlin)
When method coverage is enabled, a method that has been redefined vanishes from `Coverage.result` once GC runs. It is not reported as uncovered (count 0), it is missing altogether, so the set of methods reported for a file changes nondet...sferik (Erik Berlin)