From: Jordi Bunster Date: 2009-11-01T01:52:10+09:00 Subject: Re: In-place parameter modification On Oct 31, 2009, at 12:44 PM, Robert Gleeson wrote: > Yup, you can write your own mutating methods that mutate the > receiver(like chomp!, gsub!, sub!, and so on), but you can't mutate > any > of the core classes because you cannot reassign self. Some core classes know how to replace themselves: class String def clobber! replace '' end end I wonder why Object (or BasicObject) doesn't know this trick. I also wonder why "replace" isn't called "replace!" :) -- Jordi