Ruby implementation of Levenshtein's edit distance algorithm