From: Harry Kakueki Date: 2011-07-24T16:44:46+09:00 Subject: Re: best style for setting items in a collection > feel like I should be able to do this using the each method but can't > figure out how to make the assignment work that way, and the upto > version is pretty short and sweet. > Does this #each give you what you want? This is your way but with #each. (1...arr.length).each{|i| arr[i] += arr[i - 1]} Harry