summaryrefslogtreecommitdiff
path: root/lib/rubygems/user_interaction.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/user_interaction.rb')
-rw-r--r--lib/rubygems/user_interaction.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/rubygems/user_interaction.rb b/lib/rubygems/user_interaction.rb
index 0ab44fbf6c..e632f418a9 100644
--- a/lib/rubygems/user_interaction.rb
+++ b/lib/rubygems/user_interaction.rb
@@ -258,23 +258,23 @@ class Gem::StreamUI
end
default_answer = case default
- when nil
- 'yn'
- when true
- 'Yn'
- else
- 'yN'
- end
+ when nil
+ 'yn'
+ when true
+ 'Yn'
+ else
+ 'yN'
+ end
result = nil
while result.nil? do
result = case ask "#{question} [#{default_answer}]"
- when /^y/i then true
- when /^n/i then false
- when /^$/ then default
- else nil
- end
+ when /^y/i then true
+ when /^n/i then false
+ when /^$/ then default
+ else nil
+ end
end
return result