a ruby port of https://code.google.com/p/google-diff-match-patch/