From 535649eed14f40e6fd429786668209ad32fddf74 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 16 Oct 2012 00:49:23 +0000 Subject: merge revision(s) 37169: [Backport #7169] use tty(1) to check if /dev/tty is usable or not git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 41c296e3b6..074fdee23a 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2067,8 +2067,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