From: Stefan Kaes Date: 2005-11-24T00:31:12+09:00 Subject: Re: semenatics of if/unless/while statement modifiers 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