Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix incompatibility with JRuby 9K - #356 #529
Currently bunny doesn't work at all with JRuby 9K - when trying to connect it fails with the behaviour described in #356.
This PR fixes that plus a couple of more issues, the integration specs are fully green but the full specs fail so this should be regarded as WIP + feedback on the changes.
Yes we have a valid option for JRuby (March Hare gem) but it would be nice for Bunny at least to function with JRuby 9K even if that implies a bigger overhead than native Java libs - Im thinking for some smaller apps having the full Bunny gem API might be useful.
This switches back to the CPU heavy read_nonblock since readpartial randomly hangs in JRuby . It also fixes the private method #open called in JRuby by redefining it in the Socket module. Yet another fix is to rescue EOFError .  - https://gist.github.com/knewter/5818005  - jruby/jruby#1694 (comment)