I tested it, it compares properly when unsorted. From the Hash docs:

Equality—Two hashes are equal if they each contain the same number of keys and if each key-value pair is equal to (according to Object#==) the corresponding elements in the other hash.