From: Adriano Ferreira Date: 2006-01-23T22:45:30+09:00 Subject: Re: Line breaking in Ruby can be dangerous On 1/23/06, Florian Frank wrote: > "1 * 2" and "+ 1" are both valid ruby expressions, the latter "(unary +) > 1". How should Ruby find out, that you wanted to continue your first > expression in the next line? Ruby would find it out because of the leading "(" or that would be what I and apparently Sky Yin expect. This works: irb(main):001:0> (1 irb(main):002:1> ) => 1 This too: irb(main):003:0> begin (1 irb(main):004:2> ) end => 1 But I think I understand why it works this way. In Yin's example: (1*2 +1) is interpreted just like (1*2; +1) what would not happen if he had written (1*2+ 1) which gives a proper answer. Kind regards, Adriano.