Merge rubygems master.

This is RC version of Rubygems 2.7.0.
  688fb7e83c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2017-10-08 01:32:18 +00:00
parent 6b05153a3a
commit c00e84327f
96 changed files with 2021 additions and 701 deletions

View file

@ -7,11 +7,6 @@
require 'rubygems/util'
begin
require 'io/console'
rescue LoadError
end
##
# Module that defines the default UserInteraction. Any class including this
# module will have access to the +ui+ method that returns the default UI.
@ -314,12 +309,21 @@ class Gem::StreamUI
password
end
if IO.method_defined?(:noecho) then
def _gets_noecho
@ins.noecho {@ins.gets}
def require_io_console
@require_io_console ||= begin
begin
require 'io/console'
rescue LoadError
end
true
end
elsif Gem.win_platform?
def _gets_noecho
end
def _gets_noecho
require_io_console
if IO.method_defined?(:noecho) then
@ins.noecho {@ins.gets}
elsif Gem.win_platform?
require "Win32API"
password = ''
@ -332,9 +336,7 @@ class Gem::StreamUI
end
end
password
end
else
def _gets_noecho
else
system "stty -echo"
begin
@ins.gets