Stephen White <spwhite / chariot.net.au> writes:

> On Fri, 13 Jul 2001, Martin DeMello wrote:
> 
> > From a newbie perspective,  
> >    
> >    array.collect! { | elem | elem += x } 
> > 
> > is a misleading piece of code, since you're using += for its return value
> > rather than its side effect.
> 
> That would have gotten me. I had to read it again to be sure what
> it was doing...
> 
>   array.collect! {|elem| elem + x }
> 
> would be clearer.
> 
> -- 
>   spwhite / chariot.net.au

Thank you, Martin and Stephen. I will change the example.

Jim
-- 
Jim Menard, jimm / io.com, http://www.io.com/~jimm/
"The 'inverse Dilbert correlation factor'--the more Dilbert cartoons pasted
on office doors and bulletin boards, the less well off the project is."
    -- Yourdon, "Death March"