IO::Splice.copy_stream doesn't change offset of source file
commitb5ec116e331c22c064bee46f63145e325785e33f
authorEric Wong <normalperson@yhbt.net>
Sun, 1 May 2011 20:29:51 +0000 (1 13:29 -0700)
committerEric Wong <normalperson@yhbt.net>
Sun, 1 May 2011 20:30:17 +0000 (1 13:30 -0700)
treed51e6693303ba4cc473d13209fc6d27785d3664a
parentb39448e121f8f060c274ee1ee3c473f7b20d92e1
IO::Splice.copy_stream doesn't change offset of source file

This is for compatibility with IO.copy_stream and IO#sendfile,
both of which use pread()-semantics when given a source file
offset.   This allows multiple threads/processes to copy from
the same file handle.
lib/io/splice.rb
test/test_io_splice.rb