Stefano Crocco wrote in post #1001011: > On Thursday 26 May 2011 04:22:46 jason solomon wrote: >> >> How would you write a method that actually modifies the str object? > This should do what you want > > class String > > def clear > replace '' > end > > end > > Stefano Thanks for the reply. Say we wanted to write our own replace method and not use the replace method provided by the String class? -- Posted via http://www.ruby-forum.com/.