handle ruby 3.x keyword arguments delegation#53
Conversation
|
PS: I see the CI Github Actions setup is "hardcoded" to use ruby 2.6 polymorphic_integer_type/.github/workflows/ci.yml Lines 26 to 29 in d27d276 |
|
Thank you @rcugut This already works in production, but I also had to change few things to make make it work in Rails 7. Hope this will be merged soon |
Thank you @olegantonyan I just updated to Rail 7 too, and I had to only change the gemspec to for activerecord 7, and it works. I'll watch for an update and use the published gem when you push it. Thank you |
|
If only I was a contributor here, he-he :) |
Ruby 3 and rails 7 support
This adds code compatibility with ruby 3.x changes in regard the delegation of positional splat arguments.
More info in the official ruby blog post explaining this change:
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
The existing code breaks for ruby 3.x:
I tested (locally) and the code changes are backward compatible for ruby 2.6 and 2.7.