diff --git a/lib/rubygems/mirror/fetcher.rb b/lib/rubygems/mirror/fetcher.rb index 928baef..4abc8a6 100644 --- a/lib/rubygems/mirror/fetcher.rb +++ b/lib/rubygems/mirror/fetcher.rb @@ -1,3 +1,11 @@ +# We forcibly require OpenSSL, because net/http/persistent will only autoload +# it. On some Rubies, autoload fails but explicit require succeeds. +begin + require 'openssl' +rescue LoadError + # some Ruby builds don't have OpenSSL +end + require 'net/http/persistent' require 'time'