summaryrefslogtreecommitdiff
path: root/bootstraptest/test_thread.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-23 16:24:46 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-23 16:24:46 +0000
commitc43236eaf78b7b74dfa7a41456d347deb2b5da1f (patch)
tree5d154f21e2cb389e70a70ed82017fe30ee5a0557 /bootstraptest/test_thread.rb
parentc55dd9b7d8cf71f62709dab492f4221f090a6a79 (diff)
* bootstraptest/test_thread.rb: fix for environment where fork is not
available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_thread.rb')
-rw-r--r--bootstraptest/test_thread.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index e586ee2..02cd202 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"