Implementing a max-heap in Ruby (with heapsort)

Here at Code For Cash we figure that if we are going to be asking candidates to be proficient in data structures and algorithms, we should be as well.

Here is an example of max heap and heapsort implementation in Ruby.