From: Malte Milatz Date: 2006-02-28T19:13:42+09:00 Subject: Re: Is this Ruby warning making sense??? rubyrus schrieb: > Does anyone think if this the warning makes any sense? > > irb(main):002:0> puts "abc" if (a=true) (irb):2: warning: found = in > conditional, should be == abc Yes, because you are testing an expression (a=true) though it's obvious in this context that it will return true. This means that the `if` is meaningless for `puts "abc"`. You won't get the warning when you write `if true`, however. In this case Ruby assumes that you wrote this intenionally, while in the above case, the programmer might simply have failed to write ==. Malte