summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-07-02 01:25:17 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-07-02 01:38:11 -0300
commit9716b13861645e6e5d4589e7c56415328f68c976 (patch)
treefb315b7823968b8b0cd5763c7996e1a974c2830e
parent1b2babce21c1dc16331c890c8a6c6e2550d0759b (diff)
downloadhighline-9716b13861645e6e5d4589e7c56415328f68c976.tar.gz
Simplify conditional
-rw-r--r--lib/highline/question_asker.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/highline/question_asker.rb b/lib/highline/question_asker.rb
index 4c1ff5b..10a43ef 100644
--- a/lib/highline/question_asker.rb
+++ b/lib/highline/question_asker.rb
@@ -75,12 +75,11 @@ class HighLine
if verify_match && (@highline.send(:unique_answers, answers).size > 1)
explain_error(:mismatch)
else
- verify_match = false
+ break
end
- break unless verify_match
end
- question.verify_match ? @highline.send(:last_answer, answers) : answers
+ verify_match ? @highline.send(:last_answer, answers) : answers
end
# Gather multiple integer values based on {Question#gather} count