From: Henrik Date: 2006-01-06T22:34:30+09:00 Subject: Re: How to write a destructive string method? ts wrote: >>>>>> "H" == Henrik writes: > > H> def upcase! > H> self = self.upcase > > replace(upcase) > > H> end > H> end > > > Guy Decoux Worked fine, thanks! Got some help on #ruby-lang, apparently you can do stuff like the above and self[0..-1] = "whatever" but not self = "whatever" seeing as self is an object, not a variable - if anyone else was wondering. -- Posted via http://www.ruby-forum.com/.