Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IO::Buffered#peek doesn't respect read_buffering #6956

Open
RX14 opened this issue Oct 18, 2018 · 0 comments
Open

IO::Buffered#peek doesn't respect read_buffering #6956

RX14 opened this issue Oct 18, 2018 · 0 comments
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib

Comments

@RX14
Copy link
Contributor

RX14 commented Oct 18, 2018

See #6916.

The best solution is to make IO#peek return nil when read_buffering is false, but that exposes a problem where IO#gets_peek assumes incorrectly that IO#peek returning nil is the same as returning an empty slice.

@RX14 RX14 added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib labels Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib
Projects
None yet
Development

No branches or pull requests

1 participant