Trans said:
Recently I was suprised by the behavior of "start = lambda { start }".
Undecorated symbols aren't interpreted until they're executed. Ruby
doesn't even know if the 'start' symbol inside the { ... } is a method
or a local variable until it gets there. That's how I got away with a
lot of my poetry stuff (and how other's've done the same). So "start =
lambda { ADOSdsgfsdgsjT___SDdddd_____222__S224444449
soduihgsoihosidho5s2405987soos23h }" works just as well. (Hadn't
followed the previous thread; you might've already figured this out.)
Now that I understand that, I am suprised that
a = 1
b = i if (i = a)
doesn't work.
Yeah, that's just weirdness. Possibly because Matz feels local
side-effects should move from left to right? In any case, you can do
a = 1
if (i = a) then b = i end
instead.
Devin