summary refs log tree commit homepage
path: root/lib/rainbows/never_block.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-10-28 02:17:25 +0000
committerEric Wong <normalperson@yhbt.net>2010-10-28 02:17:25 +0000
commitc4579db76b9ed5b0286fad852e798e8a890f093c (patch)
tree71ff2073fc59b20467bdcd0b7b37fe7841099c84 /lib/rainbows/never_block.rb
parent83644e02068311c7ff9cdbc63efd4764d1518138 (diff)
For consistency, changed settings are reset back to
their default values if they are removed or commented
out from the config file.
Diffstat (limited to 'lib/rainbows/never_block.rb')
-rw-r--r--lib/rainbows/never_block.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/rainbows/never_block.rb b/lib/rainbows/never_block.rb
index 9f050a5..308398e 100644
--- a/lib/rainbows/never_block.rb
+++ b/lib/rainbows/never_block.rb
@@ -31,8 +31,11 @@ module Rainbows
         raise ArgumentError, "pool_size must a be an Integer > 0"
       mod = Rainbows.const_get(O[:backend])
       require "never_block" # require EM first since we need a higher version
-      G.server.extend(mod)
-      G.server.extend(Core)
+    end
+
+    def self.extended(klass)
+      klass.extend(Rainbows.const_get(O[:backend])) # EventMachine
+      klass.extend(Core)
     end
 
     module Core  # :nodoc: all