2007/11/16, Sean O'Halpin <sean.ohalpin / gmail.com>: > I also find myself using this pattern: > > if response = http.response # i.e. expecting nil or false on failure > response.foo > # etc. > else > ... > end I seriously dislike the pattern above for the following reasons: it can be easily misread as "if response == http.response" and there is no need to have an assignment inside an if condition. In this case I prefer an extra variable setter or using "and" if there is just one statement: response = http.response if response ... end response = http.response and puts response The situation is different with loops because there often this is the most elegant solution: while line = gets ... end Cheers robert -- use.inject do |as, often| as.you_can - without end