diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-10-22 02:50:09 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-10-22 18:37:45 +0000 |
commit | 4a568eeb7d17885579790d0ae004f04aa13479cb (patch) | |
tree | 02a4a93997c3393c0be399d5363d6127fa0d6b44 /lib/rainbows | |
parent | 6d46978bdc8d2ee4263431ecdcada53389b12597 (diff) | |
download | rainbows-4a568eeb7d17885579790d0ae004f04aa13479cb.tar.gz |
Applications may use wait_readable-aware methods directly to work with Rainbows!
Diffstat (limited to 'lib/rainbows')
-rw-r--r-- | lib/rainbows/dev_fd_response.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/dev_fd_response.rb b/lib/rainbows/dev_fd_response.rb index 7f70b8e..ec09d1e 100644 --- a/lib/rainbows/dev_fd_response.rb +++ b/lib/rainbows/dev_fd_response.rb @@ -54,7 +54,8 @@ class Rainbows::DevFdResponse < Struct.new(:app) # we need to make sure our pipe output is Fiber-compatible case env["rainbows.model"] when :FiberSpawn, :FiberPool, :RevFiberSpawn - io = Rainbows::Fiber::IO.new(io,::Fiber.current) + io.respond_to?(:wait_readable) or + io = Rainbows::Fiber::IO.new(io) when :Revactor io = Rainbows::Revactor::Proxy.new(io) end |