From 451ca6997b4f298b436605b7f0af75f369320425 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 22 Dec 2009 12:46:26 -0800 Subject: fix Ruby 1.8 detection for (possible) green thread fix Thanks to Ben Sandofsky for the extra set of eyes --- lib/rainbows/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index 4a4d076..20c7681 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -15,7 +15,7 @@ module Rainbows G.tmp = worker.tmp # avoid spurious wakeups and blocking-accept() with 1.8 green threads - if RUBY_VERSION.to_f < 1.8 + if RUBY_VERSION.to_f < 1.9 require "io/nonblock" LISTENERS.each { |l| l.nonblock = true } end -- cgit v1.2.3-24-ge0c7