From: mental@... Date: 2006-02-09T01:45:22+09:00 Subject: Re: boolean annoyance Quoting Claudio Jeker : > IMO if it looks like a boolean expression it should act like a > boolean expression. That's the point, isn't it? 0 isn't a boolean value. You typically only see 0 -> false equivalences in languages that don't have a distinct boolean type (C, Perl, etc...). Ruby's not one of those. > Why can't there be a to_bool converter for all numerical Classes? There is one; it's just called #nonzero? instead of #to_bool: if ( flags & 0x01 ).nonzero? ... end -mental