From: Robert Dober Date: 2010-03-10T18:24:59+09:00 Subject: Re: Shortest code On Wed, Mar 10, 2010 at 9:07 AM, Prasanth Ravi wrote: > Florian Aßmann wrote: >> interesting... >> >> ree-1.8.7-2010.01 > puts eval(gets.gsub(/(?:-\d|[^0-9])+/, '+')<<'+0') >> 1 2 3 -4 >> 6 >>  => nil >> ree-1.8.7-2010.01 > puts eval(gets.gsub(/(?:-\d|[^0-9])+/, '+')<<'+0') >> 1 -2 3 4 >> 8 >>  => nil >> >> ol' ruby? >> >> Am 09.03.2010 um 04:39 schrieb Prasanth Ravi: > > irb(main):010:0> puts eval(gets.gsub(/(?:-\d|[^0-9])+/, '+')<<'+0') > 3 4 -5 > 7 > => nil > irb(main):011:0> puts eval(gets.gsub(/(?:-\d|[^0-9])+/, '+')<<'+0') > -56 > 6 > => nil > > was it -(56) or -5 & 6 ? :D > -- > Posted via http://www.ruby-forum.com/. > > 1 -2 8 is nice too ;) Even spec your golfs !!! -- Learning without thought is labor lost; thought without learning is perilous.” --- Confucius