diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-07 09:56:30 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-07 09:56:30 +0000 |
commit | 733be259071adba092ff9a2163cfed39392b2ad9 (patch) | |
tree | 8c803f4a13ee2f5604a3138449f1c8e6ab6d05f6 | |
parent | 04b81ae7992b8eb06fc89b6874be11c046dfad76 (diff) |
* lib/rubygems/user_interaction.rb (Gem::StreamUI#tty?): IO#tty? of
Windows has been fixed at r29969.
* test/rubygems/test_gem_stream_ui.rb: now can run tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/rubygems/user_interaction.rb | 8 | ||||
-rw-r--r-- | test/rubygems/test_gem_stream_ui.rb | 12 |
3 files changed, 9 insertions, 18 deletions
@@ -1,3 +1,10 @@ +Tue Jun 7 18:52:55 2011 NAKAMURA Usaku <[email protected]> + + * lib/rubygems/user_interaction.rb (Gem::StreamUI#tty?): IO#tty? of + Windows has been fixed at r29969. + + * test/rubygems/test_gem_stream_ui.rb: now can run tests. + Tue Jun 7 18:36:41 2011 NAKAMURA Usaku <[email protected]> * test/rubygems/test_gem.rb (TestGem#{test_self_user_home_userprofile, diff --git a/lib/rubygems/user_interaction.rb b/lib/rubygems/user_interaction.rb index 1dbcf38eee..c6665c125f 100644 --- a/lib/rubygems/user_interaction.rb +++ b/lib/rubygems/user_interaction.rb @@ -142,12 +142,8 @@ class Gem::StreamUI end def tty? - if RUBY_PLATFORM =~ /mingw|mswin/ - @usetty - else - @usetty && @ins.tty? - end - end + @usetty && @ins.tty? + end ## # Choose from a list of options. +question+ is a prompt displayed above diff --git a/test/rubygems/test_gem_stream_ui.rb b/test/rubygems/test_gem_stream_ui.rb index 4bc6df6f93..2a99af037e 100644 --- a/test/rubygems/test_gem_stream_ui.rb +++ b/test/rubygems/test_gem_stream_ui.rb @@ -41,8 +41,6 @@ class TestGemStreamUI < Gem::TestCase end def test_ask - skip 'TTY detection broken on windows' if Gem.win_platform? - timeout(1) do expected_answer = "Arthur, King of the Britons" @in.string = "#{expected_answer}\n" @@ -52,8 +50,6 @@ class TestGemStreamUI < Gem::TestCase end def test_ask_no_tty - skip 'TTY handling is broken on windows' if Gem.win_platform? - @in.tty = false timeout(0.1) do @@ -63,8 +59,6 @@ class TestGemStreamUI < Gem::TestCase end def test_ask_for_password - skip 'Always uses $stdin on windows' if Gem.win_platform? - timeout(1) do expected_answer = "Arthur, King of the Britons" @in.string = "#{expected_answer}\n" @@ -74,8 +68,6 @@ class TestGemStreamUI < Gem::TestCase end def test_ask_for_password_no_tty - skip 'TTY handling is broken on windows' if Gem.win_platform? - @in.tty = false timeout(0.1) do @@ -85,8 +77,6 @@ class TestGemStreamUI < Gem::TestCase end def test_ask_yes_no_no_tty_with_default - skip 'TTY handling is broken on windows' if Gem.win_platform? - @in.tty = false timeout(0.1) do @@ -99,8 +89,6 @@ class TestGemStreamUI < Gem::TestCase end def test_ask_yes_no_no_tty_without_default - skip 'TTY handling is broken on windows' if Gem.win_platform? - @in.tty = false timeout(0.1) do |