Sync RubyGems and Bundler with upstream

This commit is contained in:
Hiroshi SHIBATA 2021-07-07 14:07:29 +09:00
parent 6e2240a2f9
commit c082c6eb7c
Notes: git 2021-07-07 15:32:14 +09:00
52 changed files with 477 additions and 466 deletions

View file

@ -5,10 +5,18 @@
#
class Gem::UriParser
def self.parse_uri(source_uri)
return source_uri unless source_uri.is_a?(String)
new.parse(source_uri)
end
##
# Parses the #uri, raising if it's invalid
def parse!(uri)
require "uri"
raise URI::InvalidURIError unless uri
# Always escape URI's to deal with potential spaces and such