Pure Ruby implementation of a Rope data structure