I have a hash {:a => b} and I want to add a value to that key and turn it into an array of values keeping the previous one.
So the result would be {:a => [b, c]}
Is there a better way to do this than iterating through the hash?
I have a hash {:a => b} and I want to add a value to that key and turn it into an array of values keeping the previous one.
So the result would be {:a => [b, c]}
Is there a better way to do this than iterating through the hash?