On 02/01/2012 03:49 AM, Gavin Sinclair wrote:
> def foo; nil; end
>
> if (a, b = foo)
>    puts "outcome 1"
> else
>    puts "outcome 2"   # I was expecting this.
> end

You can trick ruby:

def foo; nil; end

if (_ = (a, b = foo))
   puts "outcome 1"
else
   puts "outcome 2"
end

So, the question is parsing, not semantics.