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

keyword args should not override optional args #743

Closed
rkh opened this issue May 17, 2013 · 2 comments
Closed

keyword args should not override optional args #743

rkh opened this issue May 17, 2013 · 2 comments

Comments

@rkh
Copy link
Contributor

rkh commented May 17, 2013

$ cat kwarg.rb
def foo(arg = nil, **kwargs)
  p arg
  p kwargs
end

foo a: 42

$ ruby --version
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0]

$ jruby --version
jruby 1.7.4.dev (1.9.3p392) 2013-05-10 18c8b85 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_04-ea-b15 [darwin-amd64]

$ ruby kwarg.rb
nil
{:a=>42}

$ jruby --2.0 -X-C kwarg.rb
{:a=>42}
{:a=>42}
@enebo
Copy link
Member

enebo commented May 17, 2013

Yeah I actually knew about this one and a couple of others from MRI tests. Unfortunately, I did not want to fix all cases properly right before JRuby 1.7.4. Our main issue is we have a single ArgNodes class and logic which handles argument binding in the interpreter for 1.8,1.9, and 2.0 modes in the same code path. We will need to trifurcate this a bit :)

@headius
Copy link
Member

headius commented Nov 12, 2014

Working in 9k.

@headius headius closed this as completed Nov 12, 2014
@headius headius added this to the JRuby 9.0.0.0-pre1 milestone Nov 12, 2014
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