From: Pixel Date: 2001-04-28T20:00:52+09:00 Subject: [ruby-talk:14374] Re: || .. or Question matz@zetabits.com (Yukihiro Matsumoto) writes: > Hi, > > In message "[ruby-talk:14268] Re: || .. or Question" > on 01/04/27, Marko Schulz writes: > > |Why is 'n == 3 or n == 5' not an expression? And > |why is 'n == 3 || n == 5' on the other hand one? > > Simply precedence reason. about surprising precedence: Math.sqrt (1-2).abs is (Math.sqrt(1-2)).abs p (1..10).to_a is (p(1..10)).to_a but return (1-2).abs is return((1-2).abs) which show that "return" is parsed differently even if it has a functional syntax just like "Math.sqrt". "return" has a lower precedence cu Pixel.