Hi all,
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. Class: Hash (Ruby 3.1.2) for the standard method signature).
I have posted a patch including tests at https://rails.lighthouseapp.com/projects/8994/tickets/4838-patch-add-block-support-to-activesupport-orderedhash-merge 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.