-
Notifications
You must be signed in to change notification settings - Fork 629
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
Can't pass an empty hash as callback parameters to transition_from
since 5.5.0
#829
Comments
y-yagi
added a commit
to y-yagi/aasm
that referenced
this issue
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 aasm#829.
Would this be caused because in your event transition definition transitions from: :sleeping, to: :running, after: :prepare_run! the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Can't pass an empty hash as callback parameters to
transition_from
since 5.5.0To Reproduce
Reproduce script is here.
Expected behavior
Allow to pass an empty hash as callback parameters via
transition_from
Additional context
This has happened since #808.
The text was updated successfully, but these errors were encountered: