Hi,

Am Dienstag, 22. Feb 2005, 20:49:51 +0900 schrieb Dan Fitzpatrick:
> The following was derived from a portion of the destrutive! operations 
> thread.
> 
> Here is a proposal for evaluating "", 0, and nil in an if statement:
> 
> Add empty? to NilClass and Fixnum
> 
> nil.empty? => true
> 0.empty?   => true
> 
> These already exist:
> "".empty?  => true
> [].empty?  => true
> {}.empty?  => true

Maybe even "true.empty? #=> true", "false.empty? #=> false"?

A good chance to end the discussions started over and over
about strings and numbers in `if' clauses, I think.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de