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

[2.0] Incorrect arity checking for methods with kw arguments #1049

Closed
97jaz opened this Issue Sep 30, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@97jaz
Copy link
Contributor

commented Sep 30, 2013

The following program should raise an ArgumentError:

def test(foo: 10)
  foo
end

test(3)

In the latest JRuby it instead produces 10.

On the other hand, this should not raise an argument error:

def test(foo, bar: 10)
  [foo, bar]
end

test(no: "way")

...but it does. (MRI 2.0.0p0 also got this wrong, but p247 displays correct behavior.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.