Skip to content

Parallel value assignment broken in IR builder (multi-value literals, calls, attr-assign, etc.) #2574

@jowl

Description

@jowl

It appears as if variables in expressions are evaluated at a later stage in jruby-head than in MRI and JRuby 1.7.19, as shown in the example below.

$ rvm jruby-head,jruby-1.7.19,2.2.0 do ruby -e 'a=0;b=[a,a=1];p(b)'
[1, 1]
[0, 1]
[0, 1]

Or more readable

a = 0
[a, (a = 1)] # => [1, 1]

This is as minimal an example as I've been able to produce, and I don't really know where to continue the investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions