call-seq:
max! -> value max! -> nil
Returns the item with the largest key and removes it from the heap.
maxheap = MaxHeap.new([1, 2, 3, 4]) maxheap.max! #=> 4 maxheap.size #=> 3
449 450 451
# File 'lib/containers/heap.rb', line 449 def max! self.pop end