summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Meissner <wmeissner@gmail.com>2012-11-13 18:26:03 +1100
committerWayne Meissner <wmeissner@gmail.com>2012-11-13 18:26:03 +1100
commit8dde8521329c3c5cd1daee4ea1d7212e327c096d (patch)
tree9e66a7e14cfbf879cdc58a605654ce8fb27debc0
parent0a4cfff21553c36c7e4d789942731c15eb4695c4 (diff)
downloadffi-8dde8521329c3c5cd1daee4ea1d7212e327c096d.tar.gz
Make the non-MRI loading generic
-rw-r--r--lib/ffi.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ffi.rb b/lib/ffi.rb
index 2b0e6fd..f21241d 100644
--- a/lib/ffi.rb
+++ b/lib/ffi.rb
@@ -13,7 +13,8 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
require 'ffi/ffi'
-elsif defined?(RUBY_ENGINE) && (RUBY_ENGINE == 'jruby' || RUBY_ENGINE == 'rbx')
+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?