Io_splice 2.0.0 - IO::Splice.copy_stream fixes

Changes:

This fixes the issue with our copy_stream where non-pipe
descriptors with the O_NONBLOCK flag set were not handled
correctly. Like IO.copy_stream in Ruby 1.9, our
IO::Splice.copy_stream will always block until IO is available
(or raise if there are errors).

IO::Splice.copy_stream now closes all file descriptors that were
opened within the method, reducing pressure on the garbage
collector.

There are also new singleton convenience methods:

  • IO::Splice.full - blocks and splices the full amount
  • IO::Splice.partial - blocks until something is spliceable

They are used internally to implement IO::Splice.copy_stream,
but may also be useful to end users.

Rcov shows 100% test coverage \o/

Eric W. [email protected] wrote:

Changes:

Oops, I screwed up the Subject: line in the original announcement.

I also just tried this release under Rubinius and it works as of
Rubinius commit db6ea50cacb1b2b246ee445f03ae4ffec3015a07. I
even found a bug in my test cases triggered by Rubinius, but
the actual library works fine.