Skip to content

Commit

Permalink
Merge pull request #823 from headius/no_rubygems
Browse files Browse the repository at this point in the history
Check JRuby version without accessing Gem
  • Loading branch information
larskanis committed Sep 23, 2020
2 parents f2dcc6b + b0f9d16 commit 1459859
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ffi.rb
Expand Up @@ -8,11 +8,11 @@

require 'ffi/ffi'

elsif RUBY_ENGINE == 'jruby' && Gem::Version.new(RUBY_ENGINE_VERSION) >= Gem::Version.new("9.3.pre")
elsif RUBY_ENGINE == 'jruby' && (RUBY_ENGINE_VERSION.split('.').map(&:to_i) <=> [9, 3]) >= 0
JRuby::Util.load_ext("org.jruby.ext.ffi.FFIService")
require 'ffi/ffi'

elsif RUBY_ENGINE == 'truffleruby' && Gem::Version.new(RUBY_ENGINE_VERSION) >= Gem::Version.new("20.1.0-dev-a")
elsif RUBY_ENGINE == 'truffleruby' && (RUBY_ENGINE_VERSION.split('.').map(&:to_i) <=> [20, 1, 0]) >= 0
require 'truffleruby/ffi_backend'
require 'ffi/ffi'

Expand Down

0 comments on commit 1459859

Please sign in to comment.