[前][次][番号順一覧][スレッド一覧]

ruby-changes:19905

From: usa <ko1@a...>
Date: Tue, 7 Jun 2011 18:56:37 +0900 (JST)
Subject: [ruby-changes:19905] usa:r31952 (trunk): * lib/rubygems/user_interaction.rb (Gem::StreamUI#tty?): IO#tty? of

usa	2011-06-07 18:56:30 +0900 (Tue, 07 Jun 2011)

  New Revision: 31952

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31952

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems/user_interaction.rb
    trunk/test/rubygems/test_gem_stream_ui.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31951)
+++ ChangeLog	(revision 31952)
@@ -1,3 +1,10 @@
+Tue Jun  7 18:52:55 2011  NAKAMURA Usaku  <usa@r...>
+
+	* 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  <usa@r...>
 
 	* test/rubygems/test_gem.rb (TestGem#{test_self_user_home_userprofile,
Index: lib/rubygems/user_interaction.rb
===================================================================
--- lib/rubygems/user_interaction.rb	(revision 31951)
+++ lib/rubygems/user_interaction.rb	(revision 31952)
@@ -142,12 +142,8 @@
   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
Index: test/rubygems/test_gem_stream_ui.rb
===================================================================
--- test/rubygems/test_gem_stream_ui.rb	(revision 31951)
+++ test/rubygems/test_gem_stream_ui.rb	(revision 31952)
@@ -41,8 +41,6 @@
   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 @@
   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 @@
   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 @@
   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 @@
   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 @@
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]