rb_gzreader_each created the enumerator with RETURN_ENUMERATOR(obj, 0, 0), so each_line(sep, limit) without a block iterated with the default separator and no limit. ```ruby gz = Zlib.gzip("a,b,c\nd,e\n") Zlib::GzipReader.new(StringIO.n...segiddins (Samuel Giddins)
gzreader_charboundary finds how many bytes of the character at the limit are missing from the inflated buffer, but asked gzfile_fill for only n + missing bytes. When the buffer already held more than n bytes nothing new was read, and the...segiddins (Samuel Giddins)
GzipReader#gets(0) returns "" without consuming anything, as IO#gets(0) does, so each_line(0) and readlines(0) never reached the end of the stream and allocated an empty string per iteration until the process ran out of memory. IO#each_l...segiddins (Samuel Giddins)
The separator was searched bytewise with memchr and memcmp, without checking that a match starts on a character boundary. In Shift_JIS the second byte of a character can be an ASCII byte such as "@", "a" or "|", so gets with such a separ...segiddins (Samuel Giddins)
Applied in changeset commit:git|524ff52b7977fa45bbb2056741f5178202461f90. ---------- [Bug #22606] Compile a repeat whose upper bound is zero to nothing A lazy repeat with an upper bound of zero, such as x{0,0}?, was compiled as a loop,...segiddins (Samuel Giddins)
A lazy repeat with an upper bound of zero, such as x{0,0}?, was compiled as a loop, unlike the greedy one. It could run its body once on backtracking, and the match cache analysis for it could fail with "undefined bytecode (bug)".segiddins (Samuel Giddins)
A zero repeat with the lazy modifier, `x{0,0}?`, is compiled as a loop instead of being dropped like the greedy `x{0,0}`. This has two visible effects. ### 1. The quantifier can consume one `x` ```ruby /\Ax{0,0}?x\z/.match("xx") ...segiddins (Samuel Giddins)
zlib's deflate() returns Z_BUF_ERROR when it is asked to flush again without having consumed any input since the previous flush of the same or higher rank, and the binding treated every code other than Z_OK and Z_STREAM_END as fatal. Not...segiddins (Samuel Giddins)
By running tool/update_bundled_ca_certificates.rb Signed-off-by: Samuel Giddins <segiddins@segiddins.me> https://github.com/rubygems/rubygems/commit/54f5278450segiddins (Samuel Giddins)
Instead of picking essentially a random matching platform Signed-off-by: Samuel Giddins <segiddins@segiddins.me> https://github.com/rubygems/rubygems/commit/3727096297segiddins (Samuel Giddins)