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

ruby-changes:25152

From: usa <ko1@a...>
Date: Tue, 16 Oct 2012 09:49:35 +0900 (JST)
Subject: [ruby-changes:25152] usa:r37204 (ruby_1_9_3): merge revision(s) 37169: [Backport #7169]

usa	2012-10-16 09:49:23 +0900 (Tue, 16 Oct 2012)

  New Revision: 37204

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

  Log:
    merge revision(s) 37169: [Backport #7169]
    
    use tty(1) to check if /dev/tty is usable or not

  Modified files:
    branches/ruby_1_9_3/test/ruby/test_io.rb
    branches/ruby_1_9_3/version.h

Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 37203)
+++ ruby_1_9_3/version.h	(revision 37204)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 290
+#define RUBY_PATCHLEVEL 291
 
 #define RUBY_RELEASE_DATE "2012-10-16"
 #define RUBY_RELEASE_YEAR 2012
Index: ruby_1_9_3/test/ruby/test_io.rb
===================================================================
--- ruby_1_9_3/test/ruby/test_io.rb	(revision 37203)
+++ ruby_1_9_3/test/ruby/test_io.rb	(revision 37204)
@@ -2067,8 +2067,8 @@
   def test_ioctl_linux2
     return if /linux/ !~ RUBY_PLATFORM
     return if /^i.?86|^x86_64/ !~ RUBY_PLATFORM
-    return unless File.exist?('/dev/tty')
 
+    return unless system('tty', '-s') # stdin is not a terminal
     File.open('/dev/tty') { |f|
       tiocgwinsz=0x5413
       winsize=""

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

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