diff options
author | Andre Arko <andre@arko.net> | 2015-07-18 16:42:16 -0600 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-07-18 16:44:56 -0600 |
commit | 14a7eb25ee03c9fb4ecf3e4c6b1f44a8267a413a (patch) | |
tree | 080c4590629671f0bf0fc23225b9b4b5e5e16e95 /lib/bundler/similarity_detector.rb | |
parent | 6537566d7179d3aee3451ece710cbe79ced95d4c (diff) | |
download | bundler-14a7eb25ee03c9fb4ecf3e4c6b1f44a8267a413a.tar.gz |
Fix Style/SpaceInsideBlockBraces
closes #3850
Diffstat (limited to 'lib/bundler/similarity_detector.rb')
-rw-r--r-- | lib/bundler/similarity_detector.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/similarity_detector.rb b/lib/bundler/similarity_detector.rb index d67bfbae..c4caab71 100644 --- a/lib/bundler/similarity_detector.rb +++ b/lib/bundler/similarity_detector.rb @@ -9,8 +9,8 @@ module Bundler # return an array of words similar to 'word' from the corpus def similar_words(word, limit = 3) - words_by_similarity = @corpus.map{|w| SimilarityScore.new(w, levenshtein_distance(word, w))} - words_by_similarity.select{|s| s.distance<=limit}.sort_by(&:distance).map(&:string) + words_by_similarity = @corpus.map{|w| SimilarityScore.new(w, levenshtein_distance(word, w)) } + words_by_similarity.select{|s| s.distance<=limit }.sort_by(&:distance).map(&:string) end # return the result of 'similar_words', concatenated into a list @@ -34,7 +34,7 @@ module Bundler dm = [] # distance matrix # Initialize first row values - dm[0] = (0..this.length).collect { |i| i * ins } + dm[0] = (0..this.length).collect {|i| i * ins } fill = [0] * (this.length - 1) # Initialize first column values |