From: Matthew Kerwin Date: 2012-09-18T17:10:36+09:00 Subject: Re: how to sum element of array On 18 September 2012 17:05, Ryan Davis wrote: > > On Sep 17, 2012, at 22:19 , 7stud -- wrote: > >> Padma J. wrote in post #1076389: >>> >>> >>> array.inject(0) { |sum, i| sum+i } >>> >>> Cheers. >> >> You think i is a good, descriptive variable name there? > > Q: Does it REALLY matter? > A: No... no, it does not. > No, Padma's right. I propose: array.inject(0) { |sum, banana_fritter| sum+banana_fritter } # boy, that sure was sum banana fritter!