Skip to content

IO#ready? returns incorrect results #2388

Description

@rjnienaber

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions