summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/highline/question_asker.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/highline/question_asker.rb b/lib/highline/question_asker.rb
index b919cb0..84dbd65 100644
--- a/lib/highline/question_asker.rb
+++ b/lib/highline/question_asker.rb
@@ -129,8 +129,8 @@ class HighLine
def answer_matches_regex(answer)
if question.gather.is_a?(::String) || question.gather.is_a?(Symbol)
answer.to_s == question.gather.to_s
- else question.gather.is_a?(Regexp)
- answer.to_s =~ question.gather
+ elsif question.gather.is_a?(Regexp)
+ answer.to_s =~ question.gather
end
end