You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ruby 3.2 makes it so that delegating *args to a method that accepts keywords an ArgumentError. This is what's happening in Fog::Collection because it delegates methods to Array with *args, but some Array methods accept keywords (e.g. Array#shuffle).
Solution
For maximum compatibility across all Ruby 2.x and 3.x versions, methods that delegate with *args should be marked with ruby2_keywords. I have created a PR here to address this: #292
Context
Ruby 3.2 makes it so that delegating
*args
to a method that accepts keywords an ArgumentError. This is what's happening in Fog::Collection because it delegates methods to Array with *args, but some Array methods accept keywords (e.g.Array#shuffle
).Solution
For maximum compatibility across all Ruby 2.x and 3.x versions, methods that delegate with
*args
should be marked withruby2_keywords
. I have created a PR here to address this: #292Relevant links
https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/
https://eregon.me/blog/2019/11/10/the-delegation-challenge-of-ruby27.html
The text was updated successfully, but these errors were encountered: