📅  最后修改于: 2022-03-11 15:04:45.745000             🧑  作者: Mango
代码示例1
hash1 = { two: 2, three: 3 }
#add a new key,value
hash1 = Hash[:one,1].merge!(hash1) #=> {:one=>1, :two=>2, :three=>3}