From: Mohammad Khan Date: 2004-10-30T06:50:12+09:00 Subject: Re: Another scrach on head On Fri, 2004-10-29 at 17:42, Zach Dennis wrote: > 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 > >> > >>I consider nil, false and true as three different entity. > >>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 !! > > > > > > > I fail to see where the problem is. if *a* is not an instance of the > NilClass or the FalseClass and *a* does not evaluate to nil or false, > then it will always evaluate to true in a boolean expression. ie: > > puts "a is neither nil && is not false && is not FALSE" if a > > Where do you see that that will fail? > > Also, if *a* is an instance of the TrueClass then it will equal true. ie; > > puts "a is true" if a == true > > if a is literally an instance of the TrueClass, but not if *a* is an > instance of anything else. > > Where are you seeing a problem? > > Zach > Hi Zach, I already corrected myself. Sorry for confusion. -- Mohammad