We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4b67129 + 4797873 commit 1ee9f7bCopy full SHA for 1ee9f7b
lib/jopenssl/load.rb
@@ -1,6 +1,5 @@
1
warn 'Loading jruby-openssl gem in a non-JRuby interpreter' unless defined? JRUBY_VERSION
2
3
-require 'java'
4
require 'jopenssl/version'
5
6
warn "JRuby #{JRUBY_VERSION} is not supported by jruby-openssl #{JOpenSSL::VERSION}" if JRUBY_VERSION < '1.7.20'
@@ -26,9 +25,13 @@
26
25
end
27
28
29
-require 'jruby'
30
require 'jopenssl.jar'
31
-org.jruby.ext.openssl.OpenSSL.load(JRuby.runtime)
+
+if JRuby::Util.respond_to?(:load_ext) # JRuby 9.2
+ JRuby::Util.load_ext('org.jruby.ext.openssl.OpenSSL')
32
+else; require 'jruby'
33
+ org.jruby.ext.openssl.OpenSSL.load(JRuby.runtime)
34
+end
35
36
if RUBY_VERSION > '2.3'
37
load 'jopenssl23/openssl.rb'
0 commit comments