Skip to content

Commit

Permalink
Load JRuby ext under JRuby
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Feb 16, 2020
1 parent 143c72f commit 83c729f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ffi.rb
Expand Up @@ -8,6 +8,10 @@

require 'ffi/ffi'

elsif RUBY_ENGINE == 'jruby'
JRuby::Util.load_ext("org.jruby.ext.ffi.FFIService")
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__))
Expand Down

0 comments on commit 83c729f

Please sign in to comment.