From: Alexey Muranov Date: 2011-08-07T07:25:03+09:00 Subject: [ruby-core:38828] [Ruby 1.9 - Feature #5123] Alias Hash 1.9 as OrderedHash Issue #5123 has been updated by Alexey Muranov. Anurag Priyam wrote: > Besides, the aliasing can be done at the application > level too. So if the Hash implementation changes tomorrow, you are > free to re-alias to some other ordered hash implementation. But then i will have to edit my code to upgrade to a new version of Ruby. Alexey Muranov. ---------------------------------------- Feature #5123: Alias Hash 1.9 as OrderedHash http://redmine.ruby-lang.org/issues/5123 Author: Alexey Muranov Status: Assigned Priority: Normal Assignee: Yukihiro Matsumoto Category: Target version: I read that it was a controversial decision to make Hash in Ruby 1.9 ordered. It is not clear if the present implementation is the best possible. I would like to express my thought. It would be nice if the ordered Hash in Ruby 1.9 was aliased as OrderedHash. That way people who rely on preserving the insertion order in some application (me, for example) could explicitly use OrderedHash, and developers of Ruby would be free to redefine Hash in future versions if a better implementation that a doubly-linked circular list is found. (I read something about a possibility of using "red���black tree".) Thanks. Alexey Muranov. -- http://redmine.ruby-lang.org