diff --git a/lib/containers/heap.rb b/lib/containers/heap.rb index 0473e218..5c6a7c87 100644 --- a/lib/containers/heap.rb +++ b/lib/containers/heap.rb @@ -369,7 +369,7 @@ def consolidate degree += 1 end degrees[degree] = root - min = root if min.key == root.key # this fixes a bug with duplicate keys not being in the right order + min = root if !@compare_fn[min.key, root.key] # this fixes a bug with duplicate keys not being in the right order end end @next = min