As mentioned in this answer, Array.new(size, object) creates an array with size references to the same object.
Array.new(size, object)
size
object
hash =
I came up with this answer, very short and simple solution
c_hash = Hash.new ["a","b","c","d","e","f"].each do |o| tmp = Hash.new [1,2,3].map {|r| tmp[r] = Array.new} c_hash[o] = tmp end c_hash['a'][1] << 10 p c_hash