I know this can work,but I think it is suck
a=Hash.new{|h,k|
  h[k]=Hash.new{|h,k|h[k]=Hash.new{|h,k|h[k]={}}}
}

p a[1]=1

a[2][1]=2
a[2][2][3]=4
a[3][1][1][1]=1
p a


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