From: Christian Neukirchen Date: 2006-01-23T23:03:28+09:00 Subject: Re: Line breaking in Ruby can be dangerous Sky Yin writes: >>>begin > ?> (1 * 2 > ?> + 1) > ?> end > => 1 Simply use: 1 * 2 + 1 or: 1 * 2 \ + 1 > I guess this may be attributed to the Ruby convention that the return > value by default is from the last line. The weird thing is that even > parentheses can't guarantee the result to be expected. That's because you can have multiple statements in (), e.g.: (puts "foo" puts "bar") #=> foo #=> bar -- Christian Neukirchen http://chneukirchen.org