lib/phonetics/levenshtein.rb in phonetics-3.0.3 vs lib/phonetics/levenshtein.rb in phonetics-3.0.4

- old
+ new

@@ -15,9 +15,11 @@ module Phonetics module Levenshtein extend ::PhoneticsLevenshteinCBinding def self.distance(str1, str2, verbose = false) + return if str1.nil? || str2.nil? + internal_phonetic_distance(str1, str2, verbose) end end end