M
Matthias Wiemann
Hi,
i would like to dynamically create hashes, so that I can create them by
looping over the names.
Something like:
for i in 1..10
"hash#{i}" = Hash.new
"hash#{i}" = [:key => "val"]
end
So the hashes created would go by the names hash1, hash2, hash3...
Does anyone know how to do that?
thanks
mat
i would like to dynamically create hashes, so that I can create them by
looping over the names.
Something like:
for i in 1..10
"hash#{i}" = Hash.new
"hash#{i}" = [:key => "val"]
end
So the hashes created would go by the names hash1, hash2, hash3...
Does anyone know how to do that?
thanks
mat