Permalink
Browse files

allow jruby users to opt out of the Java EventMachine reactor

  • Loading branch information...
1 parent 1aeb8a9 commit d6690e017ea20c25d43ba03bd0577c978289b31d Orion Hickman committed Dec 19, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/eventmachine.rb
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'

0 comments on commit d6690e0

Please sign in to comment.