diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-06 20:27:36 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-06 20:27:36 +0000 |
commit | 52ec5be1ba9768499b948186589c1404ccc64724 (patch) | |
tree | 51439a7d4f55a1215ac6c77a629b4a606f27e214 | |
parent | 1db6afb8369cafdfe05680798ee68fe3081251d2 (diff) | |
download | ruby_io_splice-2.1.0.tar.gz |
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/
-rwxr-xr-x | GIT-VERSION-GEN | 2 | ||||
-rw-r--r-- | GNUmakefile | 2 | ||||
-rw-r--r-- | lib/io/splice.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 0550f7e..671d859 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v2.0.0.GIT +DEF_VER=v2.1.0.GIT LF=' ' diff --git a/GNUmakefile b/GNUmakefile index 9b22bc4..1c6669e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -51,7 +51,7 @@ NEWS: GIT-VERSION-FILE $(RAKE) -s news_rdoc > $@+ mv $@+ $@ -SINCE = +SINCE = 1.0.0 ChangeLog: LOG_VERSION = \ $(shell git rev-parse -q "$(GIT_VERSION)" >/dev/null 2>&1 && \ echo $(GIT_VERSION) || git describe) diff --git a/lib/io/splice.rb b/lib/io/splice.rb index 227d63c..d60a24d 100644 --- a/lib/io/splice.rb +++ b/lib/io/splice.rb @@ -5,8 +5,8 @@ class IO module Splice - # the version of IO::Splice, currently 2.0.0 - VERSION = '2.0.0' + # the version of IO::Splice, currently 2.1.0 + VERSION = '2.1.0' # The maximum default capacity of the pipe in bytes. # Under stock Linux, this is 65536 bytes as of 2.6.11, and 4096 before |