A
ara.t.howard
Thanks Erik, I agree 100%. I ONLY applied this when testing,
but that invalidates the tests ;-)
where
performance really isn't an issue. I just needed hashes to iterate
in a
consistent order. What was unique about my situation is that the hash
order didn't matter to the functional purpose of the method. It
mattered
only when I needed to do assertions in my tests.
Honestly, if order if meaningful you should use an array. I think
any of
the above gems are not the best choice when it comes to performance.
arrayfields gives you both - an array with hash access
a @ http://codeforpeople.com/