Expand specs for StringIO#readpartial#1278
Merged
Merged
Conversation
The same test was at the bottom of the specs, grouped with the other exceptions
* Encoding of buffer argument * Exception message validation (except for EOFError) * Calling with length of 0 on a closed stream should raise an error. Added this to IO specs as well.
Member
Author
|
(P.S. I'll try to get back to my other open issues this weekend, I haven't really had the time yet to look at the remarks) |
andrykonchin
approved these changes
Jul 19, 2025
Member
|
Thank you! |
herwinw
added a commit
to herwinw/spec
that referenced
this pull request
Aug 3, 2025
… to StringIO#readpartial This one was missing in ruby#1278, I got it to work with the `encoding: binary` directive. The StringIO code was fine, the spec was just incomplete.
eregon
pushed a commit
to herwinw/spec
that referenced
this pull request
Jan 4, 2026
… to StringIO#readpartial This one was missing in ruby#1278, I got it to work with the `encoding: binary` directive. The StringIO code was fine, the spec was just incomplete.
eregon
pushed a commit
that referenced
this pull request
Jan 4, 2026
… to StringIO#readpartial This one was missing in #1278, I got it to work with the `encoding: binary` directive. The StringIO code was fine, the spec was just incomplete.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Try to sync it with
IO#readpartialas much as possible. There are two exceptions:IO#readpartialhave two specs for a closed IO-object. These tests are different, one closes the read-end of the pipe, the other closes the write-end of the pipe. The specs forStringIO#readpartialhad the same test twice, this duplication has been fixed.StringIOspecs. This looks like an upstream bug, I've created https://bugs.ruby-lang.org/issues/21517 to handle that.