summaryrefslogtreecommitdiff
path: root/lib/highline/question_asker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/highline/question_asker.rb')
-rw-r--r--lib/highline/question_asker.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/highline/question_asker.rb b/lib/highline/question_asker.rb
index 433d709..b919cb0 100644
--- a/lib/highline/question_asker.rb
+++ b/lib/highline/question_asker.rb
@@ -67,14 +67,14 @@ class HighLine
verify_match = question.verify_match
answers = []
- loop do # when verify_match is set this loop will repeat until unique_answers == 1
+ # when verify_match is set this loop will repeat until unique_answers == 1
+ loop do
answers = gather_answers_based_on_type
- if verify_match && (@highline.send(:unique_answers, answers).size > 1)
- explain_error(:mismatch)
- else
- break
- end
+ break unless verify_match &&
+ (@highline.send(:unique_answers, answers).size > 1)
+
+ explain_error(:mismatch)
end
verify_match ? @highline.send(:last_answer, answers) : answers