mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 07:26:00 +02:00
Sync RubyGems and Bundler with upstream
This commit is contained in:
parent
6e2240a2f9
commit
c082c6eb7c
Notes:
git
2021-07-07 15:32:14 +09:00
52 changed files with 477 additions and 466 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue