R
Ron M
This
a,b = x,y = 1,2
give me a
"NameError: undefined local variable or method `x' for main:Object",
yet
a = x = 1 ; b = y = 2;
or
a,b = (x,y = 1,2)
seem to work fine. It doesn't really bother me since the
workarounds are easy, but the first one looks cleaner to me.
Would this still be an error in Ruby2?
a,b = x,y = 1,2
give me a
"NameError: undefined local variable or method `x' for main:Object",
yet
a = x = 1 ; b = y = 2;
or
a,b = (x,y = 1,2)
seem to work fine. It doesn't really bother me since the
workarounds are easy, but the first one looks cleaner to me.
Would this still be an error in Ruby2?