I have two hashes which have a structure something similar to this:
hash_a = { :a => { :b => { :c => \"d\" } } }
hash_b = { :a => { :b => { :x
In order to merge one into the other as the ticket suggested, you could modify @Phrogz function
def recurse_merge( merge_from, merge_to )
merge_from.merge(merge_to) do |_,x,y|
(x.is_a?(Hash) && y.is_a?(Hash)) ? recurse_merge(x,y) : x
end
end
In case there is duplicate key, it will only use the content of merge_from
hash