we had some weird behavior in our test suite failing while using
simplecov. basically simplecov uses an at_exit that checks $! to see if
it should exit with a non-zero code. tracking down what was happening, i
found that it appears Dir.exists? returns false, as it should, but also
sets $! without throwing an exception. see this gist to see a simple
test.rb and the console output.
it appears to me that this is a bug in JRuby but i am not 100% sure. any