From: Ben Johnson Date: 2008-10-02T03:00:00+09:00 Subject: Ordered hash hack for < ruby 1.9? I am having an issue testing my code because hashes don't have a consistent order when you iterate over them. For example, one of the methods that I am trying to test iterates over a hash and creates a string. That string is in a different order every time, and my tests keep failing. What would be perfect is if I could modify how the Hash class works so it preserves the insert order, but only when I am testing. So I could include this file in my tests. Is there anything out there that does this? Thanks for your help. -- Posted via http://www.ruby-forum.com/.