Top Level Namespace

Extended by:
Cool::Coolness

Defined Under Namespace

Modules: Cool, Coolio Classes: Thread

Instance Method Summary collapse

Methods included from Cool::Coolness

cool

Instance Method Details

#cool_require(gem) ⇒ Object



1
2
3
4
5
6
7
8
9
# 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