in reply to Re: keys and values order on a hash
in thread keys and values order on a hash

given that the hash has not been modified

Specifically, changing the hash by adding or removing a key is what voids the guarantee, and so does assigning to keys. Changing a value does not affect the order.

Adding or removing a key and then undoing the action still counts as a change. That means you can get different orders from two hashes with identical keys.