about summary refs log tree commit homepage
path: root/lib/rainbows/writer_thread_pool
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-05-16 21:01:47 +0000
committerEric Wong <normalperson@yhbt.net>2011-05-16 21:01:47 +0000
commitbcd0825fc77a2986aebb3f1f5a653a64faf6a8c5 (patch)
tree43dac7e33b450446fcee87d6081c9e9f5831bc16 /lib/rainbows/writer_thread_pool
parent912c328ecfccf189239c4ad2bb7863d64342868f (diff)
downloadrainbows-bcd0825fc77a2986aebb3f1f5a653a64faf6a8c5.tar.gz
I can't wait until I stop supporting Ruby 1.8
Diffstat (limited to 'lib/rainbows/writer_thread_pool')
-rw-r--r--lib/rainbows/writer_thread_pool/client.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/writer_thread_pool/client.rb b/lib/rainbows/writer_thread_pool/client.rb
index fd537ed..4df7f49 100644
--- a/lib/rainbows/writer_thread_pool/client.rb
+++ b/lib/rainbows/writer_thread_pool/client.rb
@@ -18,7 +18,7 @@ class Rainbows::WriterThreadPool::Client < Struct.new(:to_io, :q)
       }
     end
 
-    if Rainbows::Response::COPY_STREAM
+    if Rainbows::Response::COPY_STREAM || IO.method_defined?(:trysendfile)
       def write_response(status, headers, body, alive)
         if body.respond_to?(:close)
           write_response_close(status, headers, body, alive)