Robert Klemme wrote:
> It's superfluous to convert a boolean to a boolen in *all* programming
> languages, although special bugs can arise from these conversions only in C
> and other languages that don't have real booleans:

Agreed, it's generally wrong in most languages to use equality test for
booleans. I think this is because truth values transcend types (i.e. we
can ask for truth value for many types of values). Thankfully in Ruby
things are simplified: nil and false values are always false, everything
else is true.

> #define TRUE 1
> #define FALSE 0
> 
> int x; /* a boolean */
> ....
> if ( x == TRUE ) {
>   /* not always here if x is true! */
> }
> 
> This should be valid C code that does the expected thing:
> 
> /* untested */
> int cond_met() {
>   return ++counter > 1;
> }

-- 
dave