From: Ralph Mason Date: 2002-01-24T11:44:44+09:00 Subject: Re: a can be true and false Both your tests evaluate to true in test 1. a != true (because a == '' ) So this is true in test 2 a != nil && a != false thus 'a' is true (not equal true ) so this is also true Ralph ----- Original Message ----- From: "Sung Moon" Newsgroups: comp.lang.ruby To: "ruby-talk ML" ; Sent: Thursday, January 24, 2002 3:35 PM Subject: a can be true and false > a can be true and false at the same time > > a = "" > if a != true; p "a is false" ; end > if a; p "a is true" ; end > > this produces: > > a is false > a is true > > It means a can be true and false at the same time. > Am I right? > > > thanks. > sung moon >