Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Multiple assignment expression as return value: `true` in rbx, `Array` in MRI #1955

alindeman opened this Issue · 2 comments

3 participants


rubinius 2.0.0dev (1.8.7 2279857 yyyy-mm-dd JI) [x86_64-apple-darwin12.2.0]

rbx-head :017 > def foo; a, b = 1, 2; end;
rbx-head :018 >   foo
 => true

MRI both 1.8.7 and 1.9.3 differ:

1.8.7 :001 > def foo; a, b = 1, 2; end;
1.8.7 :002 >   foo
 => [1, 2]
1.9.3p286 :001 > def foo; a, b, = 1, 2; end;
1.9.3p286 :002 >   foo
 => [1, 2]

Surprising...I thought rbx fixed this in response to a bug at some point...

See also this bug I filed with MRI...I don't believe the return value is useful enough (or often enough) to warrant creating a whole array whenever multiple assignment is used as an expression:


Duplicates #1765.

@brixen brixen closed this
@r7kamura r7kamura referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.