From: Joel VanderWerf Date: 2007-08-07T09:36:53+09:00 Subject: Re: Very weird behaviour of Ruby 1.8.6 with multi-line parenthesis expressions Michael Hollins wrote: > Are there any interesting uses of > > + x > > as a statement on its own, or is it likely that > it's a programmer error 99 times out 100? Not that I'm recommending it, but just as an idea: module Enumerable def +@ inject {|s,x| s+(+x)} end end class Object def +x x end end p +[1,2,3] # => 6 sum = +[1, [2, 3], [4.0]] p sum # => 10.0 -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407