Douglas F Shearer
2009-May-07 23:25 UTC
Patch to fix ActiveSupport::OrderedHash.[].keys Exception #2615
I''ve just uploaded a patch which fixes ticket #2615. Previously when an Ordered Hash was created through the alternative initialization method, and the keys method was called on it, an exception would be raised. It turned out that this method was not explicitly available, and the Hash.[] method, which was deferred to, did not set the @keys instance variable as is required to preserve order. I have added this missing method as well as tests which support it and demonstrate that the original bug has been fixed. This patch is valid for 2-3-stable and master. I would much appreciate it if someone could verify it. https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2615-orderedhash-constructs-a-broken-hash #ticket-2615-2 Thanks. Douglas F Shearer dougal.s@gmail.com http://douglasfshearer.com