From: David Brady Date: 2005-08-28T13:24:59+09:00 Subject: Re: Reopening with a bang: cannot assign to self Daniel Amelang wrote: >Is Array#replace what you're looking for? > > Possibly. Array#replace seems to be like collect!, it's a nicer way around the specific problem for Array only. Well, *some* classes only. Hash, String and Array all seem to have #replace. But Fixnum, Bignum, Float, and File (to name the few I just tested right now) do not. I'm asking to see if there's a general way to do it in any class. Actually, replace is an even better example of my question. How would you implement #replace in an arbitrary class that didn't already support it, such as Float or StringIO? -dB -- David Brady ruby-talk@shinybit.com I'm having a really surreal day... OR AM I?