about summary refs log tree commit homepage
path: root/lib/rainbows/revactor.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-27 01:20:47 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-27 01:23:46 -0700
commite9152a8463d62e46a772843f66ddedef52cd0b2c (patch)
treeb786a54b439fea80f65f5ea3efe51c6c70e3c9b2 /lib/rainbows/revactor.rb
parent940501b7dade7a8ba3d1406ec62c28a682919fe0 (diff)
downloadrainbows-e9152a8463d62e46a772843f66ddedef52cd0b2c.tar.gz
Also new are added basic HTTP tests for UNIX domain socket
handling (for all models, now, of course).
Diffstat (limited to 'lib/rainbows/revactor.rb')
-rw-r--r--lib/rainbows/revactor.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb
index d9f246b..ddcbc04 100644
--- a/lib/rainbows/revactor.rb
+++ b/lib/rainbows/revactor.rb
@@ -1,9 +1,6 @@
 # -*- encoding: binary -*-
 require 'revactor'
-
-# workaround revactor 0.1.4 still using the old Rev::Buffer
-# ref: http://rubyforge.org/pipermail/revactor-talk/2009-October/000034.html
-defined?(Rev::Buffer) or Rev::Buffer = IO::Buffer
+Revactor::VERSION >= '0.1.5' or abort 'revactor 0.1.5 is required'
 
 module Rainbows
 
@@ -137,16 +134,13 @@ module Rainbows
 
     def revactorize_listeners!
       LISTENERS.map! do |s|
-        if TCPServer === s
+        case s
+        when TCPServer
           ::Revactor::TCP.listen(s, nil)
-        elsif defined?(::Revactor::UNIX) && UNIXServer === s
+        when UNIXServer
           ::Revactor::UNIX.listen(s)
-        else
-          logger.error "your version of Revactor can't handle #{s.inspect}"
-          nil
         end
       end
-      LISTENERS.compact!
     end
 
   end