diff --git a/lib/zxcvbn/matchers/repeat.rb b/lib/zxcvbn/matchers/repeat.rb
index <HASH>..<HASH> 100644
--- a/lib/zxcvbn/matchers/repeat.rb
+++ b/lib/zxcvbn/matchers/repeat.rb
@@ -5,28 +5,26 @@ module Zxcvbn
         result = []
         i = 0
         while i < password.length
+          cur_char = password[i]
           j = i + 1
-          loop do
-            prev_char, cur_char = password[j-1..j]
-            if password[j-1] == password[j]
-              j += 1
-            else
-              if j - i > 2 # don't consider length 1 or 2 chains.
-                result << Match.new(
-                  :pattern => 'repeat',
-                  :i => i,
-                  :j => j-1,
-                  :token => password[i...j],
-                  :repeated_char => password[i]
-                )
-              end
-              break
-            end
+          while cur_char == password[j]
+            j += 1
           end
+
+          if j - i > 2 # don't consider length 1 or 2 chains.
+            result << Match.new(
+              :pattern => 'repeat',
+              :i => i,
+              :j => j-1,
+              :token => password[i...j],
+              :repeated_char => cur_char
+            )
+          end
+
           i = j
         end
         result
       end
     end
   end
-end
\ No newline at end of file
+end
Simplified loop construction

Algorithm is the same, basically moved the if with break, to loop condition.