Hi,

I face the following issue with a hash having an empty array as default
value.

I don't how to describe it in English, here is an illustrative code:

hash = Hash.new Array.new

hash[:a] = [1]

hash[:b] << 2

puts hash[:b]
# => returns [2]

puts hash.keys
# => returns [:a], not [:a, :b] ?

hash[:b] is set to [2] but I don't understand why hash.keys does not
include :b.

Thanks!,
Florent

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