Skip to content

Commit

Permalink
Better fix for em/pure_ruby that doesnt break other reactors
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Nov 17, 2010
1 parent 8ccc79b commit bb2c0db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/eventmachine.rb
@@ -1,11 +1,11 @@
if 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
unless defined?(EventMachine) and EventMachine.library_type == :pure_ruby
require 'rubyeventmachine'
end
require 'rubyeventmachine'
rescue LoadError
warn "Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'"
raise
Expand Down

0 comments on commit bb2c0db

Please sign in to comment.