Modernize gem for Ruby 3.0+#86
Conversation
0ee157d to
87f5d5c
Compare
87f5d5c to
6e57bf9
Compare
|
Thank you, @eglitobias! |
|
@michaelklishin Thanks for merging! Just noticed the milestone is set to 2.7.0, but that version was already released on RubyGems with my previous bugfix. It's not showing up under GitHub Releases though. |
|
You are right, the latest release on the main page was shown as |
|
@eglitobias I don't have a good explanation without a flame graph but this results in a low double digit % improvement on the benchmarks. Most likely it's the |
|
I did a quick local check with require "benchmark/ips"
x = "hello"
Benchmark.ips do |b|
b.report("== nil") { x == nil }
b.report(".nil?") { x.nil? }
b.compare!
end
I’ll open a small follow-up PR to improve the benchmarking tooling and make it easier to compare results across Ruby versions. |
Bumps required_ruby_version to >= 3.0 and removes dead code and outdated idioms that accumulated since the 2.x days.
@rangevariableis_a?over===,.nil?over== nil,key?overhas_key?,raise X, msgoverraise X.new(msg)