This project is archived and is in readonly mode.

#3393 ✓stale
Evgeniy Dolzhenko

Make ActiveSupport::OrderedHash iteration methods return itself

Reported by Evgeniy Dolzhenko | October 19th, 2009 @ 01:53 PM

1.8, 1.9 MRI Hash:

>> h = Hash.new; h.each { |k, v| } == h 
=> true

ActiveSupport::OrderedHash:

h = ActiveSupport::OrderedHash.new; h.each { |k, v| } == h
=> false

So this patch makes ActiveSupport::OrderedHash even more compatible with standard implementation, btw. the same feature can be found in Thor's OrderedHash http://github.com/wycats/thor/blob/master/lib/thor/core_ext/ordered... and in MongoDB Ruby driver http://groups.google.com/group/mongodb-dev/browse_thread/thread/b49...

Comments and changes to this ticket

  • Rohit Arondekar

    Rohit Arondekar October 6th, 2010 @ 06:37 AM

    • State changed from “new” to “stale”
    • Importance changed from “” to “”

    Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages