I'm trying to insert a hash into an array, following this example: How to make dynamic multi-dimensional array in ruby?. What went wrong?
@array = Array.new
test1 = {"key1" => "value1"}
test2 = {"key2" => "value2"}
test3 = {"key3" => "value3"}
@array.push(0)
@array[0] << test1
# ERROR: can't convert Hash into Integer
@array[0] << test2
@array.push(1)
@array[1] << test2
@array[1] << test3