diff --git a/Rakefile b/Rakefile index 91eaba49e..8b6448f2a 100644 --- a/Rakefile +++ b/Rakefile @@ -65,16 +65,9 @@ task :default => :spec namespace 'java' do - java_gem_spec = Gem::Specification.new do |s| - s.name = gem_spec.name - s.version = gem_spec.version - s.author = gem_spec.author - s.email = gem_spec.email - s.homepage = gem_spec.homepage - s.summary = gem_spec.summary - s.description = gem_spec.description - s.files = %w(LICENSE COPYING README.md CHANGELOG.md Rakefile) - s.license = gem_spec.license + java_gem_spec = gem_spec.dup.tap do |s| + s.files.reject! { |f| File.fnmatch?("ext/*", f) } + s.extensions = [] s.platform = 'java' end diff --git a/lib/ffi.rb b/lib/ffi.rb index 4f5761b06..bcbc59c46 100644 --- a/lib/ffi.rb +++ b/lib/ffi.rb @@ -8,7 +8,7 @@ require 'ffi/ffi' -elsif RUBY_ENGINE == 'jruby' +elsif RUBY_ENGINE == 'jruby' && Gem::Version.new(JRUBY_VERSION) >= Gem::Version.new("9.3.pre") JRuby::Util.load_ext("org.jruby.ext.ffi.FFIService") require 'ffi/ffi'