"Dominik Bathon" <dbatml / gmx.de> posted...
> ...
>      def to_s
>          if empty?
>              "[empty heap]"
>          else
>              res, = to_s_rec(1)
>              res.shift
>              res.join "\n"
>          end
>      end
> ...
>      # rows1 and rows2 are arrays of strings (ascii-art), this method will 
> merge
>      # those into one array of strings.
>      # The strings from rows1 / rows2 will start at p1 / p2 in the result=

The workhorse method is missing! Can you please post to_s_rec?

Cheers,
Dave