Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
@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