From: Sean Russell Date: 2001-10-27T02:33:27+09:00 Subject: [ruby-talk:23477] Re: Issues with white space [was Re: Bruce Eckel's opinion of Ruby] ts wrote: >>>>>> "S" == Sean Russell writes: > > S> Raja S. wrote: >>> puts( (����8 >>> +�20)�/�2) => 10 > > S> This is really, really bizarre. Can anyone explain to me why this is > true? S> A parse error, I could understand... but 10? > > pigeon% ruby -e 'puts((8 ; + 20) / 2)' > 10 > pigeon% .... > because ruby has seen `;' (or newline) this was interpreted as a block of > instructions, and the block return the value of the last statement. No, I understand this, and it makes sense... why isn't it a parse error? It doesn't seem like you should be able to drop arbitrary parens in the source just anywhere you please. IE, +20) / 2) should produce a parse error, n'est pas? Why, then, should the above code be interpreted as it is? Parenthesis should have the highest precidence of any element... don't they? --- SER