IO#ready? returns incorrect results
-----------------------------------

                 Key: JRUBY-5617
                 URL: http://jira.codehaus.org/browse/JRUBY-5617
             Project: JRuby
          Issue Type: Bug
          Components: Standard Library
    Affects Versions: JRuby 1.6RC3, JRuby 1.6RC1, JRuby 1.5.6
         Environment: Ubuntu 10.04.2 LTS

jruby 1.6.0.RC3 (ruby 1.8.7 patchlevel 330) (2011-03-08 bb55fc0) (OpenJDK 
64-Bit Server VM 1.6.0_20) [linux-amd64-java]
Also: 1.6.0 RC1, and 1.5.6

Standard ruby: ruby 1.9.2p180 (2011-02-18 revision 30907) [x86_64-linux]

            Reporter: Guy Allard
            Assignee: Thomas E Enebo
         Attachments: sock-ready2.rb

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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to