There is a second type of multipart warning I missed:
def foo(hash, a: 1, b: 1)
...
end
foo(bar: 42)
In this case Ruby 2.7 complains because it's ambiguous wether you expect to pass the first parameter as a hash, or if you expected to pass keyword args.
Ruby expects you to call the method with explicit brackets:
Followup to: https://github.com/Shopify/deprecation_toolkit/pull/45
There is a second type of multipart warning I missed:
In this case Ruby 2.7 complains because it's ambiguous wether you expect to pass the first parameter as a hash, or if you expected to pass keyword args.
Ruby expects you to call the method with explicit brackets:
Or better avoid this kind of method signatures.