From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-01-06T08:54:52+09:00 Subject: [ruby-talk:30314] Re: Ruby article on Freshmeat In article <3C3756E8.1D7334D3@scnsoft.com>, Yuri Leikind wrote: >Stefan Scholl wrote: >> >> http://freshmeat.net/articles/view/358/ > > >Article part: >================ >string = " this is a string " > >You can apply the strip! method to it, like this: > > string.strip! ==> "this is a string" > > > Methods which have a "!" at the end are destructive; they change the >object they are applied to. > > Now, let's capitalize our string: > > string.capitalize! ==> "This is a string" >=================== > >Actually, expressions like string.capitalize! are >evaluated to nil: > >string.capitalize! ==> nil > >If it were > > string.capitalize > >then we could add > > ==> "This is a string" > >A bit confusing ... > > >Just my two roubles. Previet, you're right, I guess if you do it in irb it'll be confusing. I was just trying to indicate what was in the string... And then there's the part about more books being released early next year - I wrote that in November. It took a while to make it to Freshmeat.net. Phil