Commit f8e4d56

mo <mokha@cisco.com>
2017-05-19 17:40:40
remove extra variable.
1 parent ca8243f
Changed files (1)
spec/word_ladder_spec.rb
@@ -42,14 +42,11 @@ DOC
 
 describe "word_ladder" do
   def match?(word, other)
-    acceptable = 1
     failures = 0
     word.size.times do |n|
       if word[n] != other[n]
         failures += 1
-        if failures > acceptable
-          return false
-        end
+        return false if failures > 1
       end
     end
     true