From: Ryan Victory Date: 2013-01-30T13:08:52+09:00 Subject: Re: newbie question.. Out of curiosity, what did you do to get it working? I played around in irb after sending that (it was a quick guess, not anything I tried first) and ended up using two lines, both with Enumerable#each...couldn't get the hash to be used as the accumulator. -Ryan Victory On 1/29/13 8:55 PM, tamouse mailing lists wrote: > On Tue, Jan 29, 2013 at 8:45 PM, tamouse mailing lists > wrote: >> On Tue, Jan 29, 2013 at 2:52 PM, Ryan Victory wrote: >>> For the same reason, I won't give you any answers, but your problem >>> could probably be solved using about two lines with the Array.inject >>> method and a Hash...think about it and ask questions. We are all here to >>> help, but we wouldn't want it to be too easy for you :-) >> >> Ok, I admit I'm stumped -- I don't get how to use a Hash inside an >> Array.inject -- I'm thinking it must be able to be done that way, but >> I just cannot grok it. >> >> #inject/#reduce/#fold are accumulators, but how does the Hash get >> passed from round to round? > Never mind, I got it... >