Sha256: 7fa68ecebd8c6aefdb8c68e7809c9464d600c115883b3996e34e0b813299b586

Contents?: true

Size: 717 Bytes

Versions: 11

Compression:

Stored size: 717 Bytes

Contents

if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
  Object.send(:remove_const, :FFI) if defined?(::FFI)
  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

11 entries across 11 versions & 3 rubygems

Version Path
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/ffi-1.3.1/lib/ffi.rb
vagrant-actionio-0.0.9 vendor/bundle/gems/ffi-1.4.0/lib/ffi.rb
ffi-1.4.1.dev-x86-mingw32 lib/ffi.rb
ffi-1.4.1.dev lib/ffi.rb
ffi-1.4.0-x86-mingw32 lib/ffi.rb
ffi-1.4.0 lib/ffi.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/ffi-1.3.1/lib/ffi.rb
ffi-1.3.1-x86-mingw32 lib/ffi.rb
ffi-1.3.1 lib/ffi.rb
ffi-1.3.0-x86-mingw32 lib/ffi.rb
ffi-1.3.0 lib/ffi.rb