From: Peter Bailey Date: 2007-02-16T23:48:13+09:00 Subject: Re: Iterating through 2 fields for one hash, or array. Alex Young wrote: > Peter Bailey wrote: >>>> def add_to_cost_centers(center_key, amount) >>> >> {"CBCD00"=>8, "EDDG00"=>8, "JOSH00"=>4, "ADAM00"=>8} >> {"CBCD00"=>8, "EDDG00"=>8, "JOSH00"=>4, "ADAM00"=>8, "HCCG00"=>4} . . . > Eh? You should get a single hash... What I'm trying to get at is > rather than try to access the data inside the loop, it should be exactly > what you're looking for after the loop's finished. You want the last > line of the pyramid, I think. I got it, Alex. And, it was my error. I was doing a "p" before my "end." As soon as I put my "p" after the "end," it worked fine. Thanks for all your help. -- Posted via http://www.ruby-forum.com/.