From: WATANABE Hirofumi Date: 2002-09-18T14:12:57+09:00 Subject: Re: Code coverage in Ruby? Hi, "Hal E. Fulton" writes: > > You know, I never use -w. :) I should form > that habit. > > > On that issue, I sometimes see warnings that I > wish I could get rid of. For example: 'if x = y' > or better yet 'while x=meth' will give me a > warning. Sometimes I'm grateful, but sometimes > I *wanted* to do that. Maybe that's my C showing. Ruby will give you a warning only when the right-hand side is a constant. If it is a constant, the if condition must be unnecessary. % ruby -we 'if foo = 1 then end' -e:1: warning: found = in conditional, should be == % ruby -we 'bar = 1; if foo = bar then end' % -- eban