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

ArgumentError message differs on multiple unknown keywords args #1522

Closed
deepj opened this issue Dec 9, 2018 · 3 comments
Closed

ArgumentError message differs on multiple unknown keywords args #1522

deepj opened this issue Dec 9, 2018 · 3 comments

Comments

@deepj
Copy link

deepj commented Dec 9, 2018

This is the same problem like in JRuby jruby/jruby#4555

MRI returns all unknown kwargs while calling a method. Instead of TruffleRuby returns only first one.

To reproduce:

def foo(bar: 'baz'); end
foo(blah: nil, blah2: nil)

MRI (2.5.3):

Traceback (most recent call last):
        3: from ~/.rubies/ruby-2.5.3/bin/irb:11:in `<main>'
        2: from (irb):3
        1: from (irb):2:in `foo'
ArgumentError (unknown keywords: blah, blah2)

TruffleRuby (1.0.0.-rc10):

ArgumentError: unknown keyword: blah
	from (irb):2:in `foo'
	from (irb):3
	from ~/.rubies/truffleruby-1.0.0-rc10/bin/irb:29:in `<main>'

The problem is, TruffleRuby shows only the first invalid kwarg.

@eregon
Copy link
Member

eregon commented Dec 10, 2018

GraphQL specs seem to depend on this: rmosolgo/graphql-ruby#726

@deepj deepj closed this as completed Jun 8, 2020
@eregon eregon reopened this Jun 19, 2020
@deepj
Copy link
Author

deepj commented Jun 25, 2022

Still a problem in truffleruby 22.2.0-dev-84832be1, like ruby 3.0.3, GraalVM CE Native [aarch64-darwin]

@andrykonchin andrykonchin self-assigned this Jun 29, 2022
@andrykonchin
Copy link
Member

Fixed in 66bd905. Thank you for reporting the issue.

@andrykonchin andrykonchin added this to the 22.3.0 milestone Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants