Skip to content

Conversation

@prahal
Copy link

@prahal prahal commented Apr 20, 2022

Moslty cope with automatic hash to keyword arguments and keyword arguments to hash deprecation by adding double sprat to the callers as was already done on this repository. Plus cope with keyword arguments delegation.

Plus replace a hash to keywords argument by a positional optional hahs argument.

Though this is fine I believe we never intended to make use of a hash to keyword arguments idiom. The use case is only a positional optional hash which is better done with a parameter as , options = {} than , **options.
But this will require to switch more code than is done in this patch. Maybe a task for later.
I did replace the double sprat by a positional optional hash parameter once in this patchset but this was because it was a specialization of a redmine signature that was already using the , options = {} and thus the double sprat was breaking when called by the redmine code.

prahal added 2 commits April 20, 2022 21:21
…ents

Ruby 3.0 does not implicitly destructure a Hash into keyword arguments
if it was the last parameter to a method call.

Also handle explicitely delegate keyword arguments.
Seems we only want an optional hash not keyword arguments so
remove the double sprat and set a default empty hash value.
@dosyfier dosyfier mentioned this pull request Sep 10, 2022
@PowerKiKi
Copy link
Collaborator

Thank you for your work so far. It has been superseded by #815

@PowerKiKi PowerKiKi closed this Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants