Austin Ziegler <halostatue / gmail.com> writes:

> On Mon, 21 Feb 2005 06:07:58 +0900, Navindra Umanee
> <navindra / cs.mcgill.ca> 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.
>
> -austin

Sometimes, I'd like an "eating nil" that returns itself for each
method call, and is false.

Then, stuff like that would be possible

while line = gets.ignore_if_nil.chomp
  ...
end

Maybe just a crazy idea... :-)

-- 
Christian Neukirchen  <chneukirchen / gmail.com>  http://chneukirchen.org