From: Dave Thomas Date: 2002-06-08T06:14:07+09:00 Subject: Re: precedence of =, and, or "Volkmann, Mark" writes: > I'm fairly new to Ruby. I was surprised to read that a = b or c > will assign b to a, then perform a logical or of a and c. I > expected the precedence of and/or to be higher than = so that it > would perform a logical or of b and c, then assign the result to a. 'or' and 'and' are statement level joiners, while '||' and '&&' are for expressions. It lets you write a = b or fail "b is not true" or even a = b || c or fail "nothing is true anymore" Dave