diff options
author | Victor Koronen <koronen@kth.se> | 2015-08-08 17:15:06 +0200 |
---|---|---|
committer | Victor Koronen <koronen@kth.se> | 2015-08-14 12:29:44 +0200 |
commit | a156547e5e9f7e20cba41f1e17e529c7cbbb0186 (patch) | |
tree | 654c8921af1f611c21cf6eb736f14152c93c0c75 /lib/bundler/similarity_detector.rb | |
parent | 686324728af2b3f85238504c527ea57a225d5b42 (diff) | |
download | bundler-a156547e5e9f7e20cba41f1e17e529c7cbbb0186.tar.gz |
Fix Style/For
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 e6921393..62423855 100644 --- a/lib/bundler/similarity_detector.rb +++ b/lib/bundler/similarity_detector.rb @@ -38,13 +38,13 @@ module Bundler fill = [0] * (this.length - 1) # Initialize first column values - for i in 1..that.length + (1..that.length).each do |i| dm[i] = [i * del, fill.flatten] end # populate matrix - for i in 1..that.length - for j in 1..this.length + (1..that.length).each do |i| + (1..this.length).each do |j| # critical comparison dm[i][j] = [ dm[i - 1][j - 1] + (this[j - 1] == that[i - 1] ? 0 : sub), |