about summary refs log tree commit homepage
path: root/lib/rainbows/dev_fd_response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/dev_fd_response.rb')
-rw-r--r--lib/rainbows/dev_fd_response.rb3
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