aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_require.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index 5c2221c77b..2e33499b41 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -769,9 +769,13 @@ class TestRequire < Test::Unit::TestCase
100.times do |i|
Thread.start {begin sleep(0.001) end until th.stop?; th.raise(IOError)}
assert_raise(IOError, "\#{i} time") do
- tap {tap {tap {load(ARGV[0])}}}
+ begin
+ tap {tap {tap {load(ARGV[0])}}}
+ rescue LoadError
+ GC.start
+ retry
+ end
end
- GC.start
end
end;
}