"Currently most file descriptors in JRuby are fake ones, but these fake file descriptors can cause conflicts when one wants to instantiate an I/O object from a native OS file descriptor, e.g. with UNIXSocket.for_fd. There should be some way to distinguish fake from real file descriptors just by looking at their values, e.g. by numbering fake file descriptors starting from the file descriptor limit."
I've seen several gems (posix-spawn, childprocess) that workaround this by getting file descriptor using JRuby/NIO internals.
This PR:
monkeypatches IO to use "real" descriptors.
adds jruby-openssl dependency for tests
removes usage of "nonblock" api in SSLSocket test due to lacking support on JRuby
In my undestanding tests broke on JRuby because poller was using wrong file descriptors for sockets. I'm not a JRuby expert but as cited on http://kenai.com/projects/jruby/pages/RubySummerOfCode2010:
I've seen several gems (
posix-spawn
,childprocess
) that workaround this by getting file descriptor using JRuby/NIO internals.This PR:
jruby-openssl
dependency for testsSSLSocket
test due to lacking support on JRuby