From: Inbroker Adams Date: 2008-04-26T00:32:24+09:00 Subject: Array inject function problem Hello Rubyists, I am new to the language and the community. My first problem is this : i used the following code : sum = 0 [1,3,5].inject() {|sum, element| sum + element} print sum I expected to get 9 but instead i get 4 I just installed the Ruby 1.8.6 one-click installer on windows and wrote the above commands in SciTE. Any suggestions?? -- Posted via http://www.ruby-forum.com/.