ruby-changes:25118
From: naruse <ko1@a...>
Date: Sat, 13 Oct 2012 01:04:41 +0900 (JST)
Subject: [ruby-changes:25118] naruse:r37169 (trunk): use tty(1) to check if /dev/tty is usable or not
naruse 2012-10-13 01:03:41 +0900 (Sat, 13 Oct 2012) New Revision: 37169 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37169 Log: use tty(1) to check if /dev/tty is usable or not Modified files: trunk/test/ruby/test_io.rb Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 37168) +++ test/ruby/test_io.rb (revision 37169) @@ -2429,8 +2429,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/