ice-cube-ruby / ice_cube

Ruby Date Recurrence Library - Allows easy creation of recurrence rules and fast querying
MIT License
2.41k stars 358 forks source link

fix(i18n): Delegate arguments properly for Ruby 3 #538

Closed tannermares closed 1 year ago

tannermares commented 1 year ago

Why this was needed

In Ruby 3, we need to explicitly handle each type of arg when delegating to another method. Positional args, kwargs, and blocks all separately. See "Handling Argument Delegation in https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

Alternatively, seeing that Ruby 2.7 is EOL at the end of this month I think it is time we can stop supporting Ruby 2.6. With that, we can use the new delegation syntax (...) introduced in Ruby 2.7.

How I did it