To your why, another why: why do you need to use multiple parallel =20
assignments in one statement? That said, parallel assignments are somewha=
t =20
known to be a rather messy bit of syntax I'm apparently not as savvy with=
=20
as I thought, since I can't make heads or tails of what is really =20
happening.
My personal tip woukd be that the assignments are associative =20
right-to-left, and only the leftmost assignment is evaluated as a paralle=
l =20
one.
What probably happens is broken down into simpler statements:
a =3D a, b # a =3D=3D [1, 2]
a, b =3D b, *a # a =3D=3D2, b=3D=3D1
where the return value of the expression is the rvalue.
So the end values are what you expect, just the return value of the =20
expression isn't.
Hint: it's easy to avoid obscure syntax, so do that if possible. Noone =20
really admires godawful one-liners from hell in code he expects to =20
understand a week after writing it, even if there is a certain charm to =20
getting things done with them
Also, parallel assignment syntax is undergoing certain subtle, but =20
significant changes that seem to resolve some of the ambiguity - you migh=
t =20
want to look on one of the webpages that summarize changes in Ruby 1.9.
David Vallner