Ruby 3.0
Fixes #8 (closed).
Not much needs changing, one notable thing: In Ruby 3, the introduction of the new Fibre facility prompted a change in the default flags for the file-descriptors returned by IO.pipe
, now the reader has O_NONBLOCK
set by default. I found that this broke several case where I deserialised (writing a serialised object to one end of the pipe in a forked subprocess while yielding the read-end of the pipe to the caller in the parent process, there is a short delay from the reader starting to read and the writer starting to write). The fix is easy, just unset the O_NONBLOCK
flag in the reader (but does involve some dark corners of Ruby, the Fcntl
module).