EventMachine emulation for Cool.io:
require 'coolio/eventmachine'
Drawbacks: slightly slower than EM. Benefits: timers are more accurate using libev than using EM TODO: some things like connection timeouts aren't implemented yet DONE: timers and normal socket functions are implemented.
# File lib/cool.io/custom_require.rb, line 1 def cool_require(gem) begin m = /(\d+.\d+)/.match(RUBY_VERSION) ver = m[1] require "#{ver}/#{gem}.so" rescue LoadError require gem end end