diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-07-11 10:10:16 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-07-31 21:07:19 +0900 |
commit | 69fa0d6d30adc876858a9bbc5baddbc9f643b9c7 (patch) | |
tree | 28bb080600efa3dc34351196a4662d2b818aa9f2 /lib | |
parent | 6b14249c9817b7afdad57de8b444c2ee4f42cd30 (diff) |
[rubygems/rubygems] Move openssl require to a separate file
So it can be reused.
https://github.com/rubygems/rubygems/commit/b9fc6e40db
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3379
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/openssl.rb | 7 | ||||
-rw-r--r-- | lib/rubygems/security.rb | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/rubygems/openssl.rb b/lib/rubygems/openssl.rb new file mode 100644 index 0000000000..39ef91e888 --- /dev/null +++ b/lib/rubygems/openssl.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +begin + require "openssl" +rescue LoadError => e + raise unless e.path == 'openssl' +end diff --git a/lib/rubygems/security.rb b/lib/rubygems/security.rb index 5c67bf5f1b..bd6d6ff8b9 100644 --- a/lib/rubygems/security.rb +++ b/lib/rubygems/security.rb @@ -7,12 +7,7 @@ require 'rubygems/exceptions' require 'fileutils' - -begin - require 'openssl' -rescue LoadError => e - raise unless e.path == 'openssl' -end +require_relative 'openssl' ## # = Signing gems |