-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fix eof? to return true when there is no more data to read #73
Fix eof? to return true when there is no more data to read #73
Conversation
65fb579
to
6973398
Compare
Fixed on ruby 2.5, took me a bit to get it installed on my machine |
Curious, this passes for me on truffleruby-dev locally |
I restarted it. BTW we should use |
Weird, it passed on ubuntu: https://github.com/ruby/zlib/actions/runs/7302371715/job/20452572723?pr=73 Maybe macOS tries to resolve symbols more eagerly than Linux? Lines 2986 to 2999 in 2561e12
I'll try that. For this PR it's enough if |
Yes it fails the same way on master: https://github.com/ruby/zlib/actions/runs/7512213347/job/20452657764?pr=75 |
CI fixed in #76 so if you rebase it should be all green. |
…he stream is not yet finished See code comments for details Fixes ruby#56
6973398
to
614708f
Compare
@eregon rebased! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, since sub_test_case
is not available in ruby core's test/unit, this test cases won't run after merging into ruby/ruby.
And the most part of the block seems dispatching by method
, it feels better to split for each methods.
This time, I'll merge #72, which has virtually the same fix.
Of course, test enhancements are welcome.
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Even if the stream is not yet finished
Similar to Socket/Pipe, we need to check if there is any actual data left,
as it is possible that the stream is not finished, but there is no data that
would be returned upon reading, so we want to report eof? in that case
Fixes #56
Tests comprehensively cover the corner cases of the deflate block boundary falling around multiples of 2048 bytes, which is the chunk size the input is read in.