1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2018-03-31 06:05:04 +00:00
parent d0775a1120
commit 40e9437267

View file

@ -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")