Files
beef/core/ruby/hash.rb
scotty.b.brown@gmail.com 35f62714b1 Moving nextgen from a branch to the trunk!!!
git-svn-id: https://beef.googlecode.com/svn/trunk@908 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
2011-04-20 07:54:56 +00:00

7 lines
208 B
Ruby

# http://snippets.dzone.com/posts/show/3401
class Hash
def recursive_merge(h)
self.merge!(h) {|key, _old, _new| if _old.class == Hash then _old.recursive_merge(_new) else _new end }
end
end