Adventures in implementing data structures in Ruby