From: Navindra Umanee Date: 2005-02-22T00:31:42+09:00 Subject: Re: destructive! operations Austin Ziegler wrote: > On Mon, 21 Feb 2005 06:07:58 +0900, Navindra Umanee > wrote: > > Often think it would be nice if "" and 0 were treated like nil. Such > > functions could then return "". Heck, NilClass.to_s and NilClass.to_i > > already return "" and 0 respectively. > > I'm far happier that they aren't. Maybe what is more annoying, is this type of inconsistency: irb(main):003:0> list[4..5] => nil irb(main):004:0> list[0..3] => [] Ruby is riddled with these and IMHO it tends to make code that much more ugly. Cheers, Navin.