mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Move openssl require to a separate file
So it can be reused.
b9fc6e40db
This commit is contained in:
parent
6b14249c98
commit
69fa0d6d30
Notes:
git
2020-07-31 21:08:17 +09:00
2 changed files with 8 additions and 6 deletions
7
lib/rubygems/openssl.rb
Normal file
7
lib/rubygems/openssl.rb
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
begin
|
||||||
|
require "openssl"
|
||||||
|
rescue LoadError => e
|
||||||
|
raise unless e.path == 'openssl'
|
||||||
|
end
|
|
@ -7,12 +7,7 @@
|
||||||
|
|
||||||
require 'rubygems/exceptions'
|
require 'rubygems/exceptions'
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
require_relative 'openssl'
|
||||||
begin
|
|
||||||
require 'openssl'
|
|
||||||
rescue LoadError => e
|
|
||||||
raise unless e.path == 'openssl'
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# = Signing gems
|
# = Signing gems
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue