a=Hash.new{|h,k| h[k]={} } p a[1]=1 a[2][1]=2 #a[2][2][3]=4 p a -- Posted via http://www.ruby-forum.com/.