diff options
author | Hiroshi SHIBATA <[email protected]> | 2025-05-13 13:29:16 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-05-13 14:37:24 +0900 |
commit | 4d9a1d5b6fc18a41fa72bb823dd49bafdc1a790f () | |
tree | 3defcdf3136718d6452f8f5caabb48b359537448 /lib/bundler | |
parent | c40557099dabfcde44f24462eab7fbd6317c52ba (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.rb | 7 | ||||
-rw-r--r-- | lib/bundler/friendly_errors.rb | 7 | ||||
-rw-r--r-- | lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb | 7 |
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' |