On versions of Ruby prior to 1.9 (where Hashes' keys have no set
order), ActiveSupport::OrderedHash implements its own merge and merge!
methods. These implementations differ to the standard library however
in that they do not support passing a block to merge (c.f.
http://ruby-doc.org/core/classes/Hash.html#M002880 for the standard
I have posted a patch including tests at
to correct this missing functionality. The implementation also closely
matches that of Rubinius' (c.f. http://github.com/evanphx/rubinius/blob/master/kernel/common/hash.rb#L429-447
Any feedback would be greatly appreciated.