You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IO#ready? returns incorrect results on second and subsequent calls.
a) Write 100 bytes to a sender socket, issue flush, keep socket open
b) Attempt 4 consecutive reads of 25 bytes each. Check IO#ready? before reading
Expected results: 100 bytes are read in 4 consecutive reads
Observed results: The first 25 bytes are read, but then the read socket never shows ready again.
Sample code is attached. Compare JRuby behavior with 'standard' Ruby using this code.
The text was updated successfully, but these errors were encountered:
godfat
pushed a commit
to godfat/jruby
that referenced
this issue
Jan 2, 2015
I'm a moron and referenced the wrong issue number in my commit message. It should have been #2338. Sorry for all the resulting noise on this issue as a result.
Wasn't a hard fix; I re-ported the logic from MRI but where they used FIONREAD and ioctl to check for available buffered bytes, I had no response. The old implementation used select to accomplish the same thing, so I reinstated that behavior.
I also cleaned up much of io/wait and got the MRI tests running. We only fail two of them, and I'm pretty sure it's due to JVM/JDK abstractions we can't avoid.
From: http://jira.codehaus.org/browse/JRUBY-5617. Works JRuby 1.7.18 (with discrepancies), fails on JRuby 9000.
IO#ready? returns incorrect results on second and subsequent calls.
a) Write 100 bytes to a sender socket, issue flush, keep socket open
b) Attempt 4 consecutive reads of 25 bytes each. Check IO#ready? before reading
Expected results: 100 bytes are read in 4 consecutive reads
Observed results: The first 25 bytes are read, but then the read socket never shows ready again.
Sample code is attached. Compare JRuby behavior with 'standard' Ruby using this code.
The text was updated successfully, but these errors were encountered: