Sha256: 419bab41a5a051c89b78636dce0b18bb150f6ddfe793075d5736f8326eb9bad3

Contents?: true

Size: 639 Bytes

Versions: 5

Compression:

Stored size: 639 Bytes

Contents

if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
  begin
    if RUBY_VERSION =~ /1.8/
      require '1.8/ffi_c'
    elsif RUBY_VERSION =~ /1.9/
      require '1.9/ffi_c'
    else
      require 'ffi_c'
    end
  rescue Exception
    require 'ffi_c'
  end

  require 'ffi/ffi'

elsif defined?(RUBY_ENGINE)
  # Remove the ffi gem dir from the load path, then reload the internal ffi implementation
  $LOAD_PATH.delete(File.dirname(__FILE__))
  $LOAD_PATH.delete(File.join(File.dirname(__FILE__), 'ffi'))
  unless $LOADED_FEATURES.nil?
    $LOADED_FEATURES.delete(__FILE__)
    $LOADED_FEATURES.delete('ffi.rb')
  end
  require 'ffi.rb'
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/ffi-1.2.0/lib/ffi.rb
ffi-1.2.1-x86-mingw32 lib/ffi.rb
ffi-1.2.1 lib/ffi.rb
ffi-1.2.0-x86-mingw32 lib/ffi.rb
ffi-1.2.0 lib/ffi.rb