"merge" is probably a bad name for these methods, since as you say, they behave differently than Ruby.

The reason for the union semantics, is that the behavior of these utilities (ours and ActiveSupport's) is easy to predict: when they find a nested hash, they *always* recurse into that hash and never treat it as a value. It's confusing to me, if we treat hashes as either a value or a recursive subtree depending on whether they are empty or not.