From 78e3185a20d9307c98fecca6d3bacfb8f2c271b8 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 12 Oct 2012 16:03:41 +0000 Subject: use tty(1) to check if /dev/tty is usable or not git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 130d6afe3e..ddc5f8cb00 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2429,8 +2429,8 @@ End 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="" -- cgit v1.2.3