JRuby

Allow the syntax `a = b = f 1`

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.6.4
  • Fix Version/s: JRuby 1.7
  • Component/s: Parser, Ruby 1.9.3
  • Labels:
  • Environment:
    OSX Lion, RVM
  • Number of attachments :
    0

Description

Ruby 1.9.3 seems to supports the syntax:

a = b = f 1

In JRuby it should be written as:
a = b = f(1)

See:
https://gist.github.com/1402843

Activity

Hide
Hiro Asari added a comment -

It's weird, but it's true. This is by design. https://github.com/ruby/ruby/blob/trunk/parse.y#L1228-1246

This guy needs a RubySpec.

In the meantime, I have fixed this on the master branch: 1dd08ac

Show
Hiro Asari added a comment - It's weird, but it's true. This is by design. https://github.com/ruby/ruby/blob/trunk/parse.y#L1228-1246 This guy needs a RubySpec. In the meantime, I have fixed this on the master branch: 1dd08ac
Hide
Hiro Asari added a comment -
Show
Hiro Asari added a comment - FYI: https://github.com/rubyspec/rubyspec/issues/90
Hide
Dmytrii Nagirniak added a comment -

Thanks Hiro.

Show
Dmytrii Nagirniak added a comment - Thanks Hiro.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: