📅  最后修改于: 2022-03-11 15:04:46.509000             🧑  作者: Mango
代码示例1
hash = { bacon: "protein", apple: "fruit" }
hash.map { |k,v| [k, v.to_sym] }.to_h
# {:bacon=>:protein, :apple=>:fruit}