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

warning: Ambiguous first argument #3946

Closed
yamam opened this issue Jun 1, 2016 · 5 comments
Closed

warning: Ambiguous first argument #3946

yamam opened this issue Jun 1, 2016 · 5 comments

Comments

@yamam
Copy link

yamam commented Jun 1, 2016

Environment

jruby 9.1.0.0 - 9.1.2.0

Expected Behavior

$ jruby -we 'p({x:-1})'
-e:1: warning: Ambiguous first argument; make sure.
{:x=>-1}

Actual Behavior

jruby 9.0.5.0

$ jruby -we 'p({x:-1})'
{:x=>-1}

ruby 2.3.1

$ ruby -we 'p({x:-1})'
{:x=>-1}
@headius headius added the parser label Jun 9, 2016
@headius
Copy link
Member

headius commented Jun 9, 2016

Might be an easy one, eh @enebo?

@enebo enebo added this to the Invalid or Duplicate milestone Jun 9, 2016
@enebo
Copy link
Member

enebo commented Jun 9, 2016

So easy it has been fixed since 9.0.5.0:

jruby -we 'p({x:-1})'
-e:1: warning: Ambiguous first argument; make sure.
{:x=>-1}

I fixed a lot of parser problems for 9.1.0.0.

@enebo enebo closed this as completed Jun 9, 2016
@yamam
Copy link
Author

yamam commented Jun 10, 2016

I tested 9.1.2.0 and 9.1.3.0-SNAPSHOT.
It still occurs.

$ jruby -v
jruby 9.1.3.0-SNAPSHOT (2.3.0) 2016-06-09 cd7ac37 OpenJDK 64-Bit Server VM 25.91-b14 on 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14 +jit [linux-x86_64]

$ jruby -we '{x:-1}'
-e:1: warning: Ambiguous first argument; make sure.

@yamam
Copy link
Author

yamam commented Jun 10, 2016

Oh I'm sorry, I made a mistake. I wrote Expected Behavior and Actual Behavior oppositely.

Expected Behavior

No warnings generate.

Actual Behavior

A strange warning(Ambiguous first argument) generates.

@enebo
Copy link
Member

enebo commented Jun 10, 2016

@yamam ah yes sorry you are correct MRI does not do this. I will reopen...

@enebo enebo reopened this Jun 10, 2016
@enebo enebo closed this as completed in df2e1a3 Jun 14, 2016
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