From: Bill Kelly Date: 2005-11-23T09:29:11+09:00 Subject: Re: a == nil or a.nil? From: "ako..." > > this is more of a philosophical question. my C experience makes me feel > more comfortable with expressions such as 'a == nil' rather than > a.nil?. i feel strange when i invoke a method on a nil value. Another thing that would be strange in C is: 5.times {print "Hello!"} :-) But to me, it's not worth embracing C's ideosyncracies when programming in Ruby. The "everything is an object" consistency of Ruby is an elegant and enjoyable part of the language. As an aside, if you're coming from C, you might be surprised that: a = 0 # zero print "it's true!" if a # => prints "it's true!" Zero is not false in Ruby. Regards, Bill