Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing an empty hash to :after transition methods #833

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

y-yagi
Copy link
Contributor

@y-yagi y-yagi commented Jun 11, 2023

Since Ruby 2.7, a double splat with an empty hash passes no arguments. So if an argument is an empty hash we should avoid it.
Ref: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/#other-minor-changes-empty-hash

Fix #829.

Since Ruby 2.7, a double splat with an empty hash passes no arguments.
So if an argument is an empty hash we should avoid it.
Ref: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/#other-minor-changes-empty-hash

Fix aasm#829.
@codeclimate
Copy link

codeclimate bot commented Jun 11, 2023

Code Climate has analyzed commit 0632dc3 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@y-yagi
Copy link
Contributor Author

y-yagi commented Jun 11, 2023

Hmm. Do I need a refactoring in this case?

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.

Can't pass an empty hash as callback parameters to transition_from since 5.5.0
1 participant