diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-23 16:24:46 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-23 16:24:46 +0000 |
commit | e3c86a37a8aaef928cfccdb5cea0f9e428f455ff (patch) | |
tree | 5d154f21e2cb389e70a70ed82017fe30ee5a0557 | |
parent | a8fcf0670892c7546f6cc036026621eb7792aa84 (diff) | |
download | ruby-e3c86a37a8aaef928cfccdb5cea0f9e428f455ff.tar.gz ruby-e3c86a37a8aaef928cfccdb5cea0f9e428f455ff.tar.xz ruby-e3c86a37a8aaef928cfccdb5cea0f9e428f455ff.zip |
* bootstraptest/test_thread.rb: fix for environment where fork is not
available.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | bootstraptest/test_thread.rb | 10 |
2 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Tue Feb 24 01:22:19 2009 Yusuke Endoh <mame@tsg.ne.jp> + + * bootstraptest/test_thread.rb: fix for environment where fork is not + available. + Tue Feb 24 01:19:38 2009 Yusuke Endoh <mame@tsg.ne.jp> * thread.c (thread_cleanup_func): unlock all locked mutexes even when diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb index e586ee274..02cd2029a 100644 --- a/bootstraptest/test_thread.rb +++ b/bootstraptest/test_thread.rb @@ -219,9 +219,13 @@ assert_equal 'true', %{ assert_equal 'ok', %{ open("zzz.rb", "w") do |f| f.puts <<-END - Thread.new { fork { GC.start } }.join - pid, status = Process.wait2 - $result = status.success? ? :ok : :ng + begin + Thread.new { fork { GC.start } }.join + pid, status = Process.wait2 + $result = status.success? ? :ok : :ng + rescue NotImplementedError + :ok + end END end require "zzz.rb" |