How to remove a key from Hash and get the remaining hash in Ruby/Rails?

前端 未结 15 1826
梦如初夏
梦如初夏 2020-12-04 04:26

To add a new pair to Hash I do:

{:a => 1, :b => 2}.merge!({:c => 3})   #=> {:a => 1, :b => 2, :c => 3}

Is there a simi

15条回答
提交回复
热议问题