Skip to content

Fix parsing array arguments with :into option #73

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

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

fatkodima
Copy link
Contributor

Fixes #72.

When we defined an array parameter and use :into when parsing, when parsed its value (array) incorrectly gets destructured in

callback!(setter, 2, sw.switch_name, *val) if setter
and passed to the callback (aka setter) in
setter = ->(name, val) {into[name.to_sym] = val} if into
and so we get the ArgumentError.

@nobu nobu merged commit 19700e9 into ruby:master Aug 5, 2024
34 checks passed
@fatkodima fatkodima deleted the fix-into-with-array-arg branch August 5, 2024 08:53
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.

Error at 'parse!' method with 'into' keyword
2 participants