From: murphy Date: 2007-10-09T12:38:59+09:00 Subject: Re: Ordered Hashes in 1.9? David Flanagan wrote: > Is this an implementation detail, or is it part of the specification? If it becomes specification, we might want to add Array-style handling for Hash: * Hash#each is already working * Hash#first is working correctly now * Hash#last may be useful * Hash#<< (with two arguments or a two-element Array) * Hash#reverse_each * Hash#[] with a range or a start and a length * Hash#sort and Hash#sort_by don't need to return an array any more * Hash#sort! and Hash#reverse! * Hash#pop, #push, #shift (already defined) and #unshift All of these can be implemented now; sorting may require more work, but the others seem easy to me. [murphy]