From: Martin DeMello Date: 2005-07-13T18:10:51+09:00 Subject: Re: Updating GUIs Daniel Brockman wrote: > > > Is there some Ruby idiom for going through every element in an array > > and destructively changing the values in it? Using collect! didn't > > seem to help at all. > > Well, that *is* how you destructively change each element. No, that's how you destructively change the *array*. You're still discarding and creating objects within it. To destructively change the elements you have to say array.collect! {|e| e.bang_method!} martin