lib/jruby-openssl.rb in jruby-openssl-0.9.2 vs lib/jruby-openssl.rb in jruby-openssl-0.9.3
- old
+ new
@@ -13,11 +13,13 @@
# runs under restricted mode or uses builtin BC
end
# Load extension
require 'jruby'
-require 'jopenssl.jar'
-org.jruby.ext.openssl.OSSLLibrary.new.load(JRuby.runtime, false)
+# only boot ext if jar has not been loaded before
+if require 'jopenssl.jar'
+ org.jruby.ext.openssl.OSSLLibrary.new.load(JRuby.runtime, false)
+end
if RUBY_VERSION >= '1.9.0'
load('jopenssl19/openssl.rb')
else
load('jopenssl18/openssl.rb')