>>33
それはHash#mergeじゃいかんの?

hash = {x:nil, y:1, z:1.5}
hash.merge x:-1
=> {:x=>-1, :y=>1, :z=>1.5}