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

Methods with exactly one argument, which is a keyword argument #1360

Closed
godfat opened this issue Dec 25, 2013 · 1 comment
Closed

Methods with exactly one argument, which is a keyword argument #1360

godfat opened this issue Dec 25, 2013 · 1 comment

Comments

@godfat
Copy link
Contributor

godfat commented Dec 25, 2013

This works in MRI:

$ ruby -ve 'def f arg:0; arg; end; p f'
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]
0

But not in JRuby I just built from master:

$ ./bin/jruby -ve 'def f arg:0; arg; end; p f'
jruby 9000.dev (2.1.0.dev) 2013-12-25 8fe42d5 on OpenJDK 64-Bit Server VM 1.7.0_45-b31 [linux-amd64]
SyntaxError: -e:1: syntax error, unexpected ':'
def f arg:0; arg; end; p f
          ^

I am not sure but we probably only need to tweak the parser for this.

@chrisseaton
Copy link
Contributor

This seems to work now. Please re-open if you are still having problems.

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

2 participants