------ art_27054_21540139.1145561550671 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 4/20/06, Logan Capaldo <logancapaldo / gmail.com> wrote: > > > > > Wouldn't it be neat if true === worked with anything that is > interpreted as true You saved my day, I was really disappointed when I found that this code was missing from ruby def TrueClass.===(other);other?true:false;end def FalseClass.===(other);! true === other; end ### That 1 is ugly def NilClass.===(other);! true === other; end shall we make a CR or for Ruby2? e.g. > > case x > when true > ... > else > ... > end > > Of course anyone would use an if statement in this situation, but it > is kind of conceptually clean and sort of matches up with Range#===, > Regexp#===, etc. Completely agree and if anyone uses an if statement why should we!!!!! But I guess it is up to everyone to "fix" ruby for his own needs. Cheers Robert -- Deux choses sont infinies : l'univers et la bóŐise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------ art_27054_21540139.1145561550671--