diff --git a/passpal.rb b/passpal.rb index 4deb7b2..f7da623 100644 --- a/passpal.rb +++ b/passpal.rb @@ -311,7 +311,7 @@ def initialize end def analyze(word) if Regexp.new('^[a-zA-Z0-9\p{Punct} ]+$'.force_encoding('utf-8'), Regexp::FIXEDENCODING).match(word) - word.tr!('A-Za-z0-9'+'!"#$%&\'()*+,\-./:;<=>?@[]^_`{|}~ ', 'U'*26+'L'*26+'D'*10+'S'*33) + word.tr!('A-Za-z0-9'+'!"#$%&\'()*+,\\-./:;<=>?@[]^_`{|}~ ', 'U'*26+'L'*26+'D'*10+'S'*33) @results[LUDS::encode(word).to_sym] += 1 else @otherCount += 1