1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/rubygems/uri_parsing.rb

24 lines
324 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require "rubygems/uri_parser"
module Gem::UriParsing
def parse_uri(source_uri)
return source_uri unless source_uri.is_a?(String)
uri_parser.parse(source_uri)
end
private :parse_uri
def uri_parser
require "uri"
Gem::UriParser.new
end
private :uri_parser
end