From: Rimantas Liubertas Date: 2006-08-07T17:30:51+09:00 Subject: Re: inject does not inject last value > fr joey: > # Whats wrong with: > # sum = [1,2,3,4,5].inject{|sum,e| sum+e } ? > > dry. > i still think inject should update sum before exit. To me sum = [1,2,3,4,5].inject{|sum,e| sum+e } is more DRY than: sum =0 [1,2,3,4,5].inject{|sum,e| sum+e } Regards, Rimantas -- http://rimantas.com/