Skip to content

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Aug 3, 2025

… 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.

… 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.
@@ -1,3 +1,4 @@
# encoding: binary
Copy link
Member

@andrykonchin andrykonchin Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we can avoid this just by converting string literals to binary encoding explicitly:

    @string.readpartial(3).should == "\xE2\x88\x82".b
    @string.readpartial(3).should == "\xCF\x86/".b

Does it look better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants