Skip to content

Commit

Permalink
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/ruby/truffle/truffle/openssl.rb
Original file line number Diff line number Diff line change
@@ -6,11 +6,14 @@
# GNU General Public License version 2
# GNU Lesser General Public License version 2.1

# If loaded directly simulate as it was not found, it can added only
# explicitly by loading openssl-stubs which makes it look like
# openssl was loaded.

load_error = LoadError.new("cannot load such file -- openssl")
load_error.instance_variable_set :@path, 'openssl'
raise load_error
if ENV['JRUBY_TRUFFLE_NATIVE_OPENSSL']
require_relative '../openssl/openssl'
else
# If loaded directly simulate as it was not found, it can added only
# explicitly by loading openssl-stubs which makes it look like
# openssl was loaded.

load_error = LoadError.new("cannot load such file -- openssl")
load_error.instance_variable_set :@path, 'openssl'
raise load_error
end

0 comments on commit a06877b

Please sign in to comment.