Is this behavior correct? I'm running some code like the following:
@a_hash = {:a => 1}
x = @a_hash
x.merge!({:b => 2})
At the end of all that, x's value has been changed as expected but so has the value for @a_hash. I'm getting {:a => 1, :b => 2} as the value for both of them. Is this normal behavior in Ruby?