diff --git a/lib/solargraph/pin/search.rb b/lib/solargraph/pin/search.rb index 5564fac7..da1de116 100644 --- a/lib/solargraph/pin/search.rb +++ b/lib/solargraph/pin/search.rb @@ -49,7 +49,7 @@ def do_query # @return [Float] def fuzzy_string_match str1, str2 return (1.0 + (str2.length.to_f / str1.length.to_f)) if str1.downcase.include?(str2.downcase) - JaroWinkler.distance(str1, str2, ignore_case: true) + JaroWinkler.similarity(str1, str2, ignore_case: true) end end end diff --git a/solargraph.gemspec b/solargraph.gemspec index 7be8dcb7..6cadbe24 100755 --- a/solargraph.gemspec +++ b/solargraph.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'bundler', '~> 2.0' s.add_runtime_dependency 'diff-lcs', '~> 1.4' s.add_runtime_dependency 'e2mmap' - s.add_runtime_dependency 'jaro_winkler', '~> 1.5' + s.add_runtime_dependency 'jaro_winkler', '~> 1.6' s.add_runtime_dependency 'kramdown', '~> 2.3' s.add_runtime_dependency 'kramdown-parser-gfm', '~> 1.1' s.add_runtime_dependency 'parser', '~> 3.0'