From: Robert Klemme Date: 2007-06-01T20:30:19+09:00 Subject: Re: Ruby bug in +=? On 01.06.2007 09:15, Michael Hollins wrote: > zarawesome@gmail.com wrote: >> On Jun 1, 3:00 am, james.d.mast...@gmail.com wrote: >>> Rewrite this longhand as: >>> >>> $list = []; >>> $list = $list + [function()]; >>> >>> Which really means: >>> >>> $list = [] + ["d"] >> >> Yeah, figured. It's just odd, and allows for some nice obfuscated >> coding. >> >> > > I'd suggest what's making for the obfuscated code here is not +=, but > the use of a global variable and a function that has side effects. > > The behavior of += doesn't seem odd to me. I'd say it's well defined. Absolutely agree! The code presented is pretty weird and far from straight forward IMHO. Kind regards robert