Allow JRuby users to use pure ruby reactor #391

Merged
merged 1 commit into from Dec 22, 2012
Jump to file
+3 −3
Split
View
@@ -1,8 +1,8 @@
-if RUBY_PLATFORM =~ /java/
+if defined?(EventMachine.library_type) and EventMachine.library_type == :pure_ruby
+ # assume 'em/pure_ruby' was loaded already
+elsif RUBY_PLATFORM =~ /java/
require 'java'
require 'jeventmachine'
-elsif defined?(EventMachine.library_type) and EventMachine.library_type == :pure_ruby
- # assume 'em/pure_ruby' was loaded already
else
begin
require 'rubyeventmachine'