summaryrefslogtreecommitdiff
path: root/lib/rubygems/user_interaction.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-12-26 14:00:11 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-12-26 15:09:21 +0900
commitb7ad60a79440f65cf883d3ff9dbdde701666ef56 (patch)
treee0033b706a480377472bf93f58eaf42f6e2301ab /lib/rubygems/user_interaction.rb
parent10c9ce9d4c632d7c6232b53367b0496aef2ebb13 (diff)
Merge RubyGems/Bundler master
from https://github.com/rubygems/rubygems/commit/72fd3dd2096af16d797ad0cd8e0d2a8869e240b3
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7025
Diffstat (limited to 'lib/rubygems/user_interaction.rb')
-rw-r--r--lib/rubygems/user_interaction.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/user_interaction.rb b/lib/rubygems/user_interaction.rb
index 2fa505423b..69de05fa24 100644
--- a/lib/rubygems/user_interaction.rb
+++ b/lib/rubygems/user_interaction.rb
@@ -290,7 +290,7 @@ class Gem::StreamUI
@outs.flush
result = @ins.gets
- result.chomp! if result
+ result&.chomp!
result
end
@@ -305,7 +305,7 @@ class Gem::StreamUI
password = _gets_noecho
@outs.puts
- password.chomp! if password
+ password&.chomp!
password
end