Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有
hash1 = {:sym1 => "aaa", :sym2 => "bbb"} hash2 = {:sym20 => "ccc", :sym21 => "ddd"}
怎么做
hash1 = {:sym1 => "aaa"} hash2 = {:sym2 => "bbb", :sym20 => "ccc", :sym21 => "ddd"}
hash2[:sym2] = hash1.delete(:sym2)