[前][次][番号順一覧][スレッド一覧]

ruby-changes:50838

From: nobu <ko1@a...>
Date: Sat, 31 Mar 2018 15:05:12 +0900 (JST)
Subject: [ruby-changes:50838] nobu:r63045 (trunk): file_types.rb: use the current terminal device

nobu	2018-03-31 15:05:04 +0900 (Sat, 31 Mar 2018)

  New Revision: 63045

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63045

  Log:
    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.

  Modified files:
    trunk/spec/ruby/core/file/fixtures/file_types.rb
Index: spec/ruby/core/file/fixtures/file_types.rb
===================================================================
--- spec/ruby/core/file/fixtures/file_types.rb	(revision 63044)
+++ spec/ruby/core/file/fixtures/file_types.rb	(revision 63045)
@@ -8,7 +8,7 @@ module FileSpecs https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/file/fixtures/file_types.rb#L8
 
     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")

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]