Sky Yin <sky.yin / gmail.com> 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  <chneukirchen / gmail.com>  http://chneukirchen.org