about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-06 19:49:12 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-06 19:49:12 +0000
commita2026eae297ee6b911b77d07e1d96a0136e1a114 (patch)
treec59553987064f231bfbc726a701d45a461643508
parentbe048fd9d58604feb7aed434a53b5abd694c06f2 (diff)
downloadruby_io_splice-a2026eae297ee6b911b77d07e1d96a0136e1a114.tar.gz
Unlike IO::Splice.copy_stream, these require at least
one of the source or destination parameters to be a
pipe.
-rw-r--r--lib/io/splice.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/io/splice.rb b/lib/io/splice.rb
index 89fde8e..38307c6 100644
--- a/lib/io/splice.rb
+++ b/lib/io/splice.rb
@@ -78,6 +78,8 @@ class IO
     end
 
     # splice the full amount specified from +src+ to +dst+
+    # Either +dst+ or +src+ must be a pipe.  +dst+ and +src+
+    # may BOTH be pipes in Linux 2.6.31 or later.
     # This will block and wait for IO completion of +len+
     # bytes.  Returns the nubmer of bytes actually spliced (always +len+)
     # The +_select_args+ parameter is reserved for internal use and
@@ -90,6 +92,8 @@ class IO
     end
 
     # splice up to +len+ bytes from +src+ to +dst+.
+    # Either +dst+ or +src+ must be a pipe.  +dst+ and +src+
+    # may BOTH be pipes in Linux 2.6.31 or later.
     # Returns the number of bytes actually spliced.
     # Like IO#readpartial, this never returns Errno::EAGAIN
     # The +_select_args+ parameter is reserved for internal use and