diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-02-04 20:39:41 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-02-04 20:39:41 -0800 |
commit | 7246d2f2d1601dbb5486ce7f9ddbebd1bb975b58 (patch) | |
tree | fd2c407b4c9bed38fbfc2d586a3c5c905954045a /lib/rainbows/epoll | |
parent | e00c2e8c53ad5b47baa5bc6a8765b7c3c92296b9 (diff) | |
download | rainbows-7246d2f2d1601dbb5486ce7f9ddbebd1bb975b58.tar.gz |
We want to use the singleton methods in Kgio to reduce conditionals.
Diffstat (limited to 'lib/rainbows/epoll')
-rw-r--r-- | lib/rainbows/epoll/response_pipe.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/rainbows/epoll/response_pipe.rb b/lib/rainbows/epoll/response_pipe.rb index 08731b1..56d9a47 100644 --- a/lib/rainbows/epoll/response_pipe.rb +++ b/lib/rainbows/epoll/response_pipe.rb @@ -27,11 +27,6 @@ class Rainbows::Epoll::ResponsePipe end def tryread - io = @io - io.respond_to?(:kgio_tryread) and return io.kgio_tryread(16384, RBUF) - io.read_nonblock(16384, RBUF) - rescue Errno::EAGAIN - :wait_readable - rescue EOFError + Kgio.tryread(@io, 16384, RBUF) end end |