Hi -- On Sat, 30 Oct 2004, Mohammad Khan wrote: > > > David, > > > > I don't agree at this point, I would like to say > > > > puts "a is neither nil, nor false, nor FALSE" if a > > puts "a is true" if a == true It comes back to the fact that the words 'true' and 'false' are used in two different ways. My example: puts "a is true" if a is using 'true' in the Boolean sense, which is actually the most common role it plays in Ruby. I've seen very few tests to see whether something is or is not the object true (TRUE). Usually the goal is to test a condition, in which case "if a" works perfectly. > > I consider nil, false and true as three different entity. They are. In addition, false and true are states. That's why we can say things like: nil and false are false which really means: the object nil and the object false both evaluate to Boolean false (Otherwise, saying 'false is false' would be sort of pointless :-) > > I don't need to show you irb screen output to illustrate it. > > > > Thanks, > > Mohammad > > > > Correcting myself, > if it is (not nil and not false and not FALSE) > only remaining state is .. true or TRUE !! false and FALSE are the same object, as are true and TRUE; I was only suggesting that using the constants might help clarify the object vs. Boolean usage. David -- David A. Black dblack / wobblini.net