From: Brian Candler Date: 2008-11-20T21:14:02+09:00 Subject: Re: build hash by iterating > Written out longhand as above: Perhaps I should have done this more clearly: tmp = {} [[:diameter, 45], [:id, 2]].each do |element| result = tmp tmp = ( result[element.first] = element.last result ) end hash = tmp The part in parentheses is the block, and you can see that the overall value from executing the block is assigned to 'tmp' to be used in the next iteration. -- Posted via http://www.ruby-forum.com/.