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

ruby-changes:46528

From: eregon <ko1@a...>
Date: Wed, 10 May 2017 23:18:05 +0900 (JST)
Subject: [ruby-changes:46528] eregon:r58649 (trunk): Use #system directly with multiple arguments in Process#kill specs

eregon	2017-05-10 23:17:58 +0900 (Wed, 10 May 2017)

  New Revision: 58649

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

  Log:
    Use #system directly with multiple arguments in Process#kill specs

  Modified files:
    trunk/spec/rubyspec/core/process/fixtures/kill.rb
Index: spec/rubyspec/core/process/fixtures/kill.rb
===================================================================
--- spec/rubyspec/core/process/fixtures/kill.rb	(revision 58648)
+++ spec/rubyspec/core/process/fixtures/kill.rb	(revision 58649)
@@ -42,8 +42,8 @@ if scenario https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/core/process/fixtures/kill.rb#L42
     raise "unknown scenario: #{scenario.inspect}"
   end
 
-  cmd = %[#{ruby_exe} -e 'Process.kill(#{signal}, #{process})']
-  Thread.new { system cmd }.join
+  code = "Process.kill(#{signal}, #{process})"
+  system(*ruby_exe.split(' '), "-e", code)
 end
 
-sleep 0.1 until signaled
+sleep 0.001 until signaled

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

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