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

ruby-changes:32135

From: nobu <ko1@a...>
Date: Sun, 15 Dec 2013 05:46:49 +0900 (JST)
Subject: [ruby-changes:32135] nobu:r44214 (trunk): test_fiber.rb: remove core

nobu	2013-12-15 05:46:44 +0900 (Sun, 15 Dec 2013)

  New Revision: 44214

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44214

  Log:
    test_fiber.rb: remove core
    
    * test/ruby/test_fiber.rb (TestFiber#invoke_rec): remove core dump
      files by stack overflow.

  Modified files:
    trunk/test/ruby/test_fiber.rb
Index: test/ruby/test_fiber.rb
===================================================================
--- test/ruby/test_fiber.rb	(revision 44213)
+++ test/ruby/test_fiber.rb	(revision 44214)
@@ -1,6 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_fiber.rb#L1
 require 'test/unit'
 require 'fiber'
 require 'continuation'
+require 'tmpdir'
 require_relative './envutil'
 
 class TestFiber < Test::Unit::TestCase
@@ -282,7 +283,9 @@ class TestFiber < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_fiber.rb#L283
     env = {}
     env['RUBY_FIBER_VM_STACK_SIZE'] = vm_stack_size.to_s if vm_stack_size
     env['RUBY_FIBER_MACHINE_STACK_SIZE'] = machine_stack_size.to_s if machine_stack_size
-    out, err = EnvUtil.invoke_ruby([env, '-e', script], '', true, true)
+    out, err = Dir.mktmpdir("test_fiber") {|tmpdir|
+      EnvUtil.invoke_ruby([env, '-e', script], '', true, true, chdir: tmpdir)
+    }
     use_length ? out.length : out
   end
 

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

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