about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rainbows/writer_thread_pool.rb11
-rw-r--r--lib/rainbows/writer_thread_spawn.rb8
2 files changed, 5 insertions, 14 deletions
diff --git a/lib/rainbows/writer_thread_pool.rb b/lib/rainbows/writer_thread_pool.rb
index ec07ccd..f7eb2aa 100644
--- a/lib/rainbows/writer_thread_pool.rb
+++ b/lib/rainbows/writer_thread_pool.rb
@@ -46,13 +46,8 @@ module Rainbows
       end
     end
 
-    alias base_write_body write_body
-    if IO.respond_to?(:copy_stream)
-      undef_method :write_body
-
-      def write_body(qclient, body)
-        qclient.q << [ qclient.to_io, :body, body ]
-      end
+    def write_body(qclient, body)
+      qclient.q << [ qclient.to_io, :body, body ]
     end
 
     @@nr = 0
@@ -71,7 +66,7 @@ module Rainbows
           begin
             io, arg1, arg2 = response
             case arg1
-            when :body then base_write_body(io, arg2)
+            when :body then Base.write_body(io, arg2)
             when :close then io.close unless io.closed?
             else
               io.write(arg1)
diff --git a/lib/rainbows/writer_thread_spawn.rb b/lib/rainbows/writer_thread_spawn.rb
index 95a04c0..0a8988f 100644
--- a/lib/rainbows/writer_thread_spawn.rb
+++ b/lib/rainbows/writer_thread_spawn.rb
@@ -88,12 +88,8 @@ module Rainbows
       end
     end
 
-    if IO.respond_to?(:copy_stream)
-      undef_method :write_body
-
-      def write_body(my_sock, body)
-        my_sock.write_body(body)
-      end
+    def write_body(my_sock, body)
+      my_sock.write_body(body)
     end
 
     def process_client(client)