diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-31 06:05:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-31 06:05:04 +0000 |
commit | 40e9437267ed80eda19c7b8f619d69d0ce430bf5 (patch) | |
tree | 994ed0a3e0107d70028ecc5ac6a6567f6be419b4 /spec | |
parent | d0775a112044602feb53746cec3ea7efa6847cd0 (diff) | |
download | ruby-40e9437267ed80eda19c7b8f619d69d0ce430bf5.tar.gz |
file_types.rb: use the current terminal device
* spec/ruby/core/file/fixtures/file_types.rb (configure_types):
try the current standard input terminal device first to get rid
of a race condition. other terminal devices may be used by
other processes and disposed during the test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/core/file/fixtures/file_types.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/core/file/fixtures/file_types.rb b/spec/ruby/core/file/fixtures/file_types.rb index 36a5ff1a95..397cac9b6b 100644 --- a/spec/ruby/core/file/fixtures/file_types.rb +++ b/spec/ruby/core/file/fixtures/file_types.rb @@ -8,7 +8,7 @@ module FileSpecs platform_is_not :windows do @block = `find /dev /devices -type b 2> /dev/null`.split("\n").first - @char = `find /dev /devices -type c 2> /dev/null`.split("\n").last + @char = `{ tty || find /dev /devices -type c; } 2> /dev/null`.split("\n").last %w[/dev /usr/bin /usr/local/bin].each do |dir| links = `find #{dir} -type l 2> /dev/null`.split("\n") |