1313require_relative "rfc3986_parser"
1414
1515module Gem ::URI
16+ # The default parser instance for RFC 2396.
1617 RFC2396_PARSER = RFC2396_Parser . new
1718 Ractor . make_shareable ( RFC2396_PARSER ) if defined? ( Ractor )
1819
20+ # The default parser instance for RFC 3986.
1921 RFC3986_PARSER = RFC3986_Parser . new
2022 Ractor . make_shareable ( RFC3986_PARSER ) if defined? ( Ractor )
2123
24+ # The default parser instance.
2225 DEFAULT_PARSER = RFC3986_PARSER
2326 Ractor . make_shareable ( DEFAULT_PARSER ) if defined? ( Ractor )
2427
28+ # Set the default parser instance.
2529 def self . parser = ( parser = RFC3986_PARSER )
2630 remove_const ( :Parser ) if defined? ( ::Gem ::URI ::Parser )
2731 const_set ( "Parser" , parser . class )
@@ -40,7 +44,7 @@ def self.parser=(parser = RFC3986_PARSER)
4044 end
4145 self . parser = RFC3986_PARSER
4246
43- def self . const_missing ( const )
47+ def self . const_missing ( const ) # :nodoc:
4448 if const == :REGEXP
4549 warn "Gem::URI::REGEXP is obsolete. Use Gem::URI::RFC2396_REGEXP explicitly." , uplevel : 1 if $VERBOSE
4650 Gem ::URI ::RFC2396_REGEXP
@@ -87,7 +91,7 @@ def make_components_hash(klass, array_hash)
8791 module_function :make_components_hash
8892 end
8993
90- module Schemes
94+ module Schemes # :nodoc:
9195 end
9296 private_constant :Schemes
9397
@@ -305,7 +309,7 @@ def self.regexp(schemes = nil)# :nodoc:
305309 256 . times do |i |
306310 TBLENCWWWCOMP_ [ -i . chr ] = -( '%%%02X' % i )
307311 end
308- TBLENCURICOMP_ = TBLENCWWWCOMP_ . dup . freeze
312+ TBLENCURICOMP_ = TBLENCWWWCOMP_ . dup . freeze # :nodoc:
309313 TBLENCWWWCOMP_ [ ' ' ] = '+'
310314 TBLENCWWWCOMP_ . freeze
311315 TBLDECWWWCOMP_ = { } # :nodoc:
@@ -424,7 +428,7 @@ def self._decode_uri_component(regexp, str, enc)
424428 private_class_method :_decode_uri_component
425429
426430 # Returns a URL-encoded string derived from the given
427- # {Enumerable}[https://docs.ruby-lang.org/en/master/ Enumerable.html#module-Enumerable-label- Enumerable+in+Ruby+Classes]
431+ # {Enumerable}[rdoc-ref: Enumerable@ Enumerable+in+Ruby+Classes]
428432 # +enum+.
429433 #
430434 # The result is suitable for use as form data
@@ -493,7 +497,7 @@ def self._decode_uri_component(regexp, str, enc)
493497 # each +key+/+value+ pair is converted to one or more fields:
494498 #
495499 # - If +value+ is
496- # {Array-convertible}[https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html#label- Array-Convertible+Objects],
500+ # {Array-convertible}[rdoc-ref:implicit_conversion.rdoc@ Array-Convertible+Objects],
497501 # each element +ele+ in +value+ is paired with +key+ to form a field:
498502 #
499503 # name = Gem::URI.encode_www_form_component(key, enc)
@@ -551,7 +555,7 @@ def self.encode_www_form(enum, enc=nil)
551555 # each subarray is a name/value pair (both are strings).
552556 # Each returned string has encoding +enc+,
553557 # and has had invalid characters removed via
554- # {String#scrub}[https://docs.ruby-lang.org/en/master/ String.html#method-i- scrub].
558+ # {String#scrub}[rdoc-ref: String# scrub].
555559 #
556560 # A simple example:
557561 #
0 commit comments