From: Yuri Leikind Date: 2002-01-06T07:14:45+09:00 Subject: [ruby-talk:30308] Re: Ruby article on Freshmeat "Michael Joner" ???????/???????? ? ???????? ?????????: news:20020105131822.70240fc9.finalfrontier@yahoo.com... > On Sat, 05 Jan 2002 19:06:58 GMT HarryO wrote: > > > That only happens if the method doesn't change the object. So, ... > > > > "hello".capitalize! # => "Hello" > > > > whereas > > > > "Hello".capitalize! # => nil > > > > because it was already capitalised. > > So what would the code be if you aren't sure whether the object has been > capitalized or not? IMHO, string.capitalize is never ambiguous, I'd prefer #method to #method! in examples. Yuri Leikind