lib/patchmaster/cursor.rb in patchmaster-1.0.0 vs lib/patchmaster/cursor.rb in patchmaster-1.1.2

- old
+ new

@@ -144,10 +144,9 @@ def find_nearest_match(list, str) return nil unless str && list && !list.empty? str = str.downcase distances = list.collect { |item| dameraulevenshtein(str, item.name.downcase) } - min_distance = distances.min list[distances.index(distances.min)] end # https://gist.github.com/182759 (git://gist.github.com/182759.git) # Referenced from http://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance