A trinary tree implemented in Ruby