On 06/20/2005 09:47 PM, James Edward Gray II wrote:
> On Jun 20, 2005, at 9:57 AM, Jason Foreman wrote:
> 
>> All personal attacks aside, Ruby does not issue warnings for this type
>> of error in all cases (pun intended, see my last message for example)
> 
> 
> That's probably because there are some valid uses for it:
> 
> if error = messages.find { |mess| mess.error? }
>     # ...
> end
> 
> If memory serves, Ruby doesn't whine about the above and that makes  me 
> very happy.

No, I think the OP's point was NOT about assining an expression in a 
conditional statement, but a literal. That's why _lint_ was made to find 
out such things for C programmers.

BTW, I'm of the opinion that these kinds of warnings and, or error 
checking should be avoided in an interpreter; it better we too write a 
Ruby lint.

-- 
Dr Balwinder Singh Dheeman            Registered Linux User: #229709
CLLO (Chief Linux Learning Officer)   Machines: #168573, 170593, 259192
Anu's Linux@HOME                      Distros: Ubuntu, Fedora, Knoppix
More: http://anu.homelinux.net/~bsd/  Visit: http://counter.li.org/