From: Prasanth Ravi Date: 2010-03-09T06:10:44+09:00 Subject: Shortest code hi i'm a newbie in ruby and was test out some interesting problems in ruby, i came across a small one to print the sum of positive numbers from a list of n numbers... with the shortest code possible.. well the best i could do was, puts gets.split(' ').inject(0){|sum,x| x.to_i>0?sum+x.to_i : sum} is there a shorter version? -- Posted via http://www.ruby-forum.com/.