diff options
-rw-r--r-- | lib/rubygems/user_interaction.rb | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -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} end - elsif Gem.win_platform? - def _gets_noecho require "Win32API" password = '' @@ -332,9 +336,7 @@ class Gem::StreamUI end end password - end - else - def _gets_noecho system "stty -echo" begin @ins.gets |