Skip to content

Heap is broken with objects #23

Open
@fbernier

Description

@fbernier

Works when the heap length is < 10 but fails with 10+

min_heap = ::Containers::Heap.new(10.times.map{Object.new}){|x, y| (x <=> y) == -1}

while val = min_heap.pop do
  p val
end

RuntimeError: Couldn't delete node from stored nodes hash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions