about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/yahns/sendfile_compat.rb4
-rw-r--r--lib/yahns/wbuf_common.rb1
2 files changed, 1 insertions, 4 deletions
diff --git a/lib/yahns/sendfile_compat.rb b/lib/yahns/sendfile_compat.rb
index cdd2d7b..8bd4622 100644
--- a/lib/yahns/sendfile_compat.rb
+++ b/lib/yahns/sendfile_compat.rb
@@ -22,7 +22,3 @@ module Yahns::SendfileCompat # :nodoc:
     end while true
   end
 end
-
-class IO # :nodoc:
-  include Yahns::SendfileCompat
-end
diff --git a/lib/yahns/wbuf_common.rb b/lib/yahns/wbuf_common.rb
index 21e9b3a..c51050b 100644
--- a/lib/yahns/wbuf_common.rb
+++ b/lib/yahns/wbuf_common.rb
@@ -7,6 +7,7 @@ begin
   require 'sendfile'
 rescue LoadError
   require_relative 'sendfile_compat'
+  IO.__send__ :include, Yahns::SendfileCompat
 end
 
 module Yahns::WbufCommon # :nodoc: