liufengyun / hashdiff

Hashdiff is a ruby library to to compute the smallest difference between two hashes
MIT License
559 stars 63 forks source link

Please document the determinism of HashDiff.diff and friends #82

Open kwasimensah opened 3 years ago

kwasimensah commented 3 years ago

So looking at compare_hashes.rb there's some sorting to make sure the results are stable and deterministic independent of the ordering of the keys. Is that true for all of the diff functions? If so it would be helpful to document this (either way) so that users of the library know if they need to sort results if they need stability (for unit tests, etc)

liufengyun commented 3 years ago

Sorry for the late response @kwasimensah . I just checked the history, it seems @krzysiek1507 made it deterministic in #52. Indeed, the docs needs to be updated about this.