>   #=> not finished in 10 seconds  [ruby-dev:32566]
> FAIL 1/918 tests failed
> make: *** [btest-ruby] Error 1

Fascinating.  I get this "sometimes" too-- OS X.
I did some research into it and it appears that "some functions"
(possibly all non blocking region functions?) within a child thread
execute twice

this code


cat testing.rb
a = Thread.new { p "th: #{Thread.current}"; print "done #{Thread.current}\n"}
b = Thread.new { p "th: #{Thread.current}"; print "done2 #{Thread.current}\n"}
a.join
b.join
print "all done\n"

you'd expect to output "th:" twice -- once for a, once for b


OS X output
"th: #<Thread:0x0ded00>"
"th: #<Thread:0x0dec88>"
"th: #<Thread:0x0ded00>"
"th: #<Thread:0x0dec88>"
done #<Thread:0x0ded00>
done2 #<Thread:0x0dec88>
all done


and in Linux outputs
"th: #<Thread:0x829a718>"
"th: #<Thread:0x829a6a0>"
done #<Thread:0x829a718>
"th: #<Thread:0x829a718>"
"th: #<Thread:0x829a6a0>"
done2 #<Thread:0x829a6a0>
all done

which is even weirder.

Taking out the two joins can cause the print statement to each execute
3 times in OS X.

Thoughts?
-=R