diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-10-15 13:20:25 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-10-15 17:19:02 +0900 |
commit | d386a58f6f1865aaa35eda5af55cff3ff3cca4ca (patch) | |
tree | 0665fe806540deae7f8e52095af6dba70f940aa3 /lib/bundler/vendor/net-http-persistent | |
parent | 7ffd14a18c341565afaf80d259f9fe5df8a13d29 (diff) | |
download | ruby-d386a58f6f1865aaa35eda5af55cff3ff3cca4ca.tar.gz |
Merge bundler-2.2.0.rc.2
Diffstat (limited to 'lib/bundler/vendor/net-http-persistent')
-rw-r--r-- | lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb index d0ab956faf..847479a0af 100644 --- a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +++ b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb @@ -3,8 +3,6 @@ require_relative '../../../../uri/lib/uri' require 'cgi' # for escaping require_relative '../../../../connection_pool/lib/connection_pool' -autoload :OpenSSL, 'openssl' - ## # Persistent connections for Net::HTTP # @@ -149,9 +147,14 @@ class Bundler::Persistent::Net::HTTP::Persistent EPOCH = Time.at 0 # :nodoc: ## - # Is OpenSSL available? This test works with autoload + # Is OpenSSL available? - HAVE_OPENSSL = defined? OpenSSL::SSL # :nodoc: + HAVE_OPENSSL = begin # :nodoc: + require 'openssl' + true + rescue LoadError + false + end ## # The default connection pool size is 1/4 the allowed open files |