From: Bojan Mihelac Date: 2007-01-20T05:55:54+09:00 Subject: Re: TrueClass === TrueClass Vincent Fourmond wrote: > Bojan Mihelac wrote: >> Hi all, >> why is: >> >> TrueClass === TrueClass # false >> Object === Object # true >> >> Documentation states that === method is used to provide meaningful >> semantic in case statements. Can anyone explain me why some classes >> returns false? > > === returns true with one class if you 'compare' it to an instance of > the class: > > irb(main):002:0> TrueClass == TrueClass > => true > irb(main):003:0> TrueClass === TrueClass > => false > irb(main):004:0> TrueClass === true > => true > > Cheers, > > Vince > Thanx Vince, just what I looked for. Bojan -- Bojan Mihelac Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com -> tools, scripts, tricks from our code lab: http://source.mihelac.org