"In 1.9, net/protocol (used by net/http, used by Gem's remote_fetcher) uses read_nonblock to fetch data. read_nonblock is supposed to raise EAGAIN when there's no data available, which Vladimir recently fixed in JRuby. However in 1.9, EAGAIN raised from read_nonblock is also supposed to .extend IO::WaitReadable, which is what net/protocol expects to rescue for retries. Since we didn't do that, the EAGAIN went all the way out, sources failed to read properly, and gems would not install.
"I pushed a fix in a1f900f for read_nonblock, but there should be similar fixes for read_partial and for EWOULDBLOCK. I'll file a separate bug for those, and for specs to be added to RubySpec."
This is that bug.