summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2025-05-13 13:29:16 +0900
committerHiroshi SHIBATA <[email protected]>2025-05-13 14:37:24 +0900
commit4d9a1d5b6fc18a41fa72bb823dd49bafdc1a790f ()
tree3defcdf3136718d6452f8f5caabb48b359537448 /lib/bundler
parentc40557099dabfcde44f24462eab7fbd6317c52ba (diff)
Handle to look up CGI::EscapeExt instead of using LoadError. cgi/escape is provided snce Ruby 2.3
Notes: Merged: https://.com/ruby/ruby/pull/13311
-rw-r--r--lib/bundler/fetcher/dependency.rb7
-rw-r--r--lib/bundler/friendly_errors.rb7
-rw-r--r--lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb7
3 files changed, 6 insertions, 15 deletions
@@ -1,11 +1,8 @@
# frozen_string_literal: true
require_relative "base"
-begin
- require "cgi/escape"
-rescue LoadError
- require "cgi/util"
-end
module Bundler
class Fetcher
@@ -102,11 +102,8 @@ module Bundler
def issues_url(exception)
message = exception.message.lines.first.tr(":", " ").chomp
message = message.split("-").first if exception.is_a?(Errno)
- begin
- require "cgi/escape"
- rescue LoadError
- require "cgi/util"
- end
"https://.com/rubygems/rubygems/search?q=" \
"#{CGI.escape(message)}&type=Issues"
end
@@ -1,10 +1,7 @@
require_relative '../../../../../vendored_net_http'
require_relative '../../../../../vendored_uri'
-begin
- require 'cgi/escape'
-rescue LoadError
- require 'cgi/util' # for escaping
-end
require_relative '../../../../connection_pool/lib/connection_pool'
autoload :OpenSSL, 'openssl'