From: 7stud -- Date: 2012-09-18T14:19:21+09:00 Subject: Re: how to sum element of array Padma J. wrote in post #1076389: > > > array.inject(0) { |sum, i| sum+i } > > Cheers. You think i is a good, descriptive variable name there? -- Posted via http://www.ruby-forum.com/.