Skip to content

Protect keyword arguments in prepare_missing() - #6305

Merged
matz merged 2 commits into
mruby:masterfrom
dearblue:method_missing
Jul 20, 2024
Merged

Protect keyword arguments in prepare_missing()#6305
matz merged 2 commits into
mruby:masterfrom
dearblue:method_missing

Conversation

@dearblue

Copy link
Copy Markdown
Contributor

Previously, keyword arguments were lost if no positional arguments were passed.

Fixed #6304

petekinnecom and others added 2 commits July 19, 2024 20:37
Fail: Method#call with undefined method -- only kwargs (mrbgems: mruby-method)
 - Assertion[6]
    NoMethodError exception expected, not
    Class: <TypeError>
    Message: <Array cannot be converted to Hash>
 - Assertion[9]
    Expected: {:kwarg1=>:val1, :kwarg2=>:val2}
      Actual: [:foo]
Previously, keyword arguments were lost if no positional arguments were passed.

Fixed mruby#6304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling method_missing with only Kwargs passes arguments incorrectly

3 participants