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

Comments

Projects
None yet
3 participants
@yamam

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

This comment has been minimized.

Show comment
Hide comment
@headius

headius Jun 9, 2016

Member

Might be an easy one, eh @enebo?

Member

headius commented Jun 9, 2016

Might be an easy one, eh @enebo?

@enebo enebo added the JRuby 9000 label Jun 9, 2016

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

@enebo

This comment has been minimized.

Show comment
Hide comment
@enebo

enebo Jun 9, 2016

Member

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.

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 Jun 9, 2016

@yamam

This comment has been minimized.

Show comment
Hide comment
@yamam

yamam 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 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

This comment has been minimized.

Show comment
Hide comment
@yamam

yamam 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.

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

This comment has been minimized.

Show comment
Hide comment
@enebo

enebo Jun 10, 2016

Member

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

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 in df2e1a3 Jun 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment