From: Robert Klemme Date: 2010-04-08T16:15:09+09:00 Subject: Re: Hash name increment on iteration? On 08.04.2010 03:27, Shaz wrote: > Is it possible to add to the name of a hash while running through an > iteration? What I'm trying to achieve: > > SomeArray.each do |i, name, content| > info[i+1] = { "name" => name, "content" => content } > end > > So that I can call, for example info[1] [name] or info[5][content]... Make info an Array and just use info << { :name => name, :content => content } Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/