Backport #2609
closedthreaded tests fail in 1.9.1 on OS X 10.5
Description
=begin
This is not 100% reliably reproducible but make test often fails.
OS X 10.5.8 9L30
#228 test_io.rb:11:in `<top (required)>':
begin
require "io/nonblock"
r, w = IO.pipe
w.nonblock = true
w.write_nonblock("a" * 100000)
w.nonblock = false
t1 = Thread.new { w.write("b" * 4096) }
t2 = Thread.new { w.write("c" * 4096) }
sleep 0.5
r.sysread(4096).length
sleep 0.5
r.sysread(4096).length
t1.join
t2.join
rescue LoadError
end
#=> not finished in 10 seconds [ruby-dev:32566]
another test failing less often - also thread related.
#921 test_thread.rb:191:in `<top (required)>':
begin
100.times do |i|
begin
Thread.start(Thread.current) {|u| u.raise }
raise
rescue
ensure
end
end
rescue
100
end
#=> "" (expected "100") [ruby-dev:31371]
FAIL 1/945 tests failed
=end