Implementation of the Heap data structure in Ruby