Hi there.

Hard to read all your text... Consider to write enough... but not all.

You have to declare your variable in this way:

a  = Hash.new{|h, k| h[k] = Hash.new(&h.default_proc)}

So, for example:

>> a  = Hash.new{|h, k| h[k] = Hash.new(&h.default_proc)}
=> {}
>> b = [1,2,3,4,5]
=> [1, 2, 3, 4, 5]
>> a["2011"]["november"]["tuesday"] = b
=> [1, 2, 3, 4, 5]
>> puts a["2011"]["november"]["tuesday"]
1
2
3
4
5
=> nil
>> puts a
{"2011"=>{"november"=>{"tuesday"=>[1, 2, 3, 4, 5]}}}
=> nil

-- 
Posted via http://www.ruby-forum.com/.