The existing interrupt handling using `SharedHelpers.trap` fails when the previous handler for a signal is not callable (for example, when it is the string "DEFAULT"). Instead, we now handle interrupts by aborting the process when worke...haines (Andrew Haines)
After calling `#ungetbyte` or `#ungetc` at the start of file, `Zlib::GzipReader#pos` should be negative. However, the calculation uses unsigned integers, and underflow occurs. Instead of the expected -1, the below outputs 184467440737...haines (Andrew Haines)
phluid61 (Matthew Kerwin) wrote: > I hope there are no encodings where valid characters might not be a multiple of the minimum size. Me too :) it works for now... the only encodings on Ruby 2.4.1 with `min_enc_len` > 1 are UTF-16 and...haines (Andrew Haines)
I'm implementing a tar archive reader that takes an arbitrary stream (`StringIO`, `File`, `Zlib::GzipReader`, ...) and yields the individual files in the archive. I'd like the yielded file reader to conform as closely as possible to the ...haines (Andrew Haines)
When implementing an IO-like object, I'd like to handle encoding correctly. To do so, I need to know the minimum and maximum character sizes for the encoding of the stream I'm reading. However, I can't find a way to access this informati...haines (Andrew Haines)