If the sematic meaning of if (object) is existence or non-existance 
(non-nil or nil) then doing this would be inelegant. Numbers are 
objects, after all, and should ideally follow the same conventions.

One might argue that only boolean expressoins be allowed in control 
statements, but I like the current mechanism and don't see too many 
shortcomings.

Nick

Steven / ruby-lang.org wrote:

>Jamis Buck <jgb3 / email.byu.edu> writes:
>  
>
>>I'm SO glad that Ruby forces you to compare numbers explicitly, instead 
>>of implicitly converting to bool. It makes code that much more readable.
>>    
>>
>
>It doesn't, though.  This code will always print "foo":
>    a = SomethingReturningANumber()
>    if (a)	# Probably meant to say "a != 0", or maybe "a == 0"
>	puts "foo"
>    end
>I think it _should_ force you to compare numbers explicitly -- comparisons
>should raise exceptions if passed anything other than booleans.  But it's
>too late for such a change.
>--
>	Steven
>"No egg nog!  In fact, no nog, period!"
>
>  
>