From: David Heinemeier Hansson Date: 2004-01-14T02:40:16+09:00 Subject: Warnings on assignments in conditionals? I consider the following statements to be perfectly legit (although perhaps slightly ambigious) and Ruby does obey, but throws this mandating warning. Am I just being paranoid or is Ruby forcing a style upon me :)? irb(main):008:0> if a = 1 then true else false end (irb):8: warning: found = in conditional, should be == => true irb(main):009:0> a => 1 irb(main):010:0> if a = nil then true else false end (irb):10: warning: found = in conditional, should be == => false irb(main):011:0> a => nil -- David Heinemeier Hansson. http://www.loudthinking.com/ -- Broadcasting Brain