Skip to content

Inconsistent end of stream handling in ByteBuffer::read_from #240

Description

@Komfr

The three implementations of this method differ in how they handle end of stream:

  • Native implementation will throw TypeError exception because read_nonblock with exception set to false returns nil which gets passed to <<.
  • C extension returns 0 which is indistinguishable from 0 which it returns when EAGAIN error is returned so the caller is unable to differentiate between those two cases.
  • JRuby version seems to be throwing EOFError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions