On Thu, Feb 2, 2012 at 4:15 AM, Joel VanderWerf
<joelvanderwerf / gmail.com> wrote:
> You can trick ruby:
>
> def foo; nil; end
>
> if (_ =3D (a, b =3D foo))
>
> =A0puts "outcome 1"
> else
> =A0puts "outcome 2"
> end
>
> So, the question is parsing, not semantics.


indeed. ruby just checks the last assignment.

> if (x,y=3D(a, b =3D foo))
> p 1
> end
SyntaxError: (irb):17: multiple assignment in conditional

but i do not know why it has to do that checking. too much work. and
could probably slow down ruby.

kind regards -botp