From: "Jan E." Date: 2012-09-26T04:02:29+09:00 Subject: Re: inject problem Roelof Wobben wrote in post #1077510: > The only problem I have to solve is when dice is a empty array. > you now get [] as answer but the answer has to be 0. Yeah, you seem to have forgot "return total" at the end of the method (you can leave out the "return", of course). Otherwise the return value is the result of "each" (which is an array). -- Posted via http://www.ruby-forum.com/.