Warren Brown wrote:

>Stefan,
>
>  
>
>>So Ruby can't know whether occurence of an equal sign
>>inside an "if" condition is a programmers intention or
>>not, unless the LHS of the assignment is a constant
>>expression.
>>    
>>
>
>    I think the point that you're missing here is that Ruby only spits
>out the warning if the *RHS* of the assignment is a constant, which
>changes the "if" to an unconditional branch (i.e. an "always" :o).
>  
>
I missed it. mea culpa.

>    If you can come up with an instance where an assignment inside an
>"if" statement spits out a warning but the branch is still undecided at
>compile time, then you would have a good argument for removing the
>warning.
>  
>

Couldn't.


-- stefan