Not sure if I'm being paranoid or not. But my code has to work in multiple flavours of Ruby, so.
Let's say we have a hash h, and
x = h.keys.zip(h.values).to_h
How confident can I be that x == h? In other words, how confident can I be that h.keys will give the same ordering of hash elements as h.values?
I see that the doc for Hash in MRI says "Hashes enumerate their values in the order that the corresponding keys were inserted". Can I really rely on that? In jRuby to?
I suppose I am used to the idea that you can't rely on the ordering of elements in a Hash. It would simplify things if I could, though.
Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer>