Closed bolshakov closed 3 years ago
* Operating system: mac * Ruby implementation: Ruby * `concurrent-ruby` version: master
Here is the test case:
def dequeue_all(queue) queue.size.times.inject([]) do |acc, _| acc << queue.pop end end queue = described_class.from_list([2, 1, 2, 0, 1, 1, 2], order: :max) queue.delete(0) expect(dequeue_all(queue)).to eq([2, 2, 2, 1, 1, 1])
It fails with the following error:
expected: [2, 2, 2, 1, 1, 1] got: [2, 2, 1, 2, 1, 1]
As you can see it does not maintain the oredr after removing an element in some cases.
Here is the test case:
It fails with the following error:
As you can see it does not maintain the oredr after removing an element in some cases.