This project is archived and is in readonly mode.
Add each_key and each_value to ActiveSupport::OrderedHash
Reported by Christoffer Sawicki | November 18th, 2008 @ 10:10 PM | in 2.x
ActiveSupport::OrderedHash currently doesn't have any methods named each_key or each_value. This is a problem since those methods are a part of the Hash interface. The attached patch has an implementation of the two methods together with tests.
Comments and changes to this ticket
-
Roger Nesbitt November 19th, 2008 @ 04:19 PM
- Tag set to patch
+1 Ran into this problem when we upgraded.
-
Christoffer Sawicki November 19th, 2008 @ 04:36 PM
I should have mentioned that the absense of these methods can cause breakage when methods return OrderedHashes instead of Hashes, as the case is with the new group_by for example.
-
Repository November 26th, 2008 @ 02:06 PM
- State changed from new to resolved
(from [05a938c5f7804fd59c76c45df096e6ebff871a18]) Added ActiveSupport::OrderedHash#each_key and ActiveSupport::OrderedHash#each_value [#1410 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
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>
People watching this ticket
Attachments
Tags
Referenced by
- 1410 Add each_key and each_value to ActiveSupport::OrderedHash (from [05a938c5f7804fd59c76c45df096e6ebff871a18]) Added A...
- 6364 ActiveSupport::OrderedHash#each* methods don't return self Breaking compatibility with Hash is not good as it leads ...