13
13
require_relative "rfc3986_parser"
14
14
15
15
module URI
16
+ # The default parser instance for RFC 2396.
16
17
RFC2396_PARSER = RFC2396_Parser . new
17
18
Ractor . make_shareable ( RFC2396_PARSER ) if defined? ( Ractor )
18
19
20
+ # The default parser instance for RFC 3986.
19
21
RFC3986_PARSER = RFC3986_Parser . new
20
22
Ractor . make_shareable ( RFC3986_PARSER ) if defined? ( Ractor )
21
23
24
+ # The default parser instance.
22
25
DEFAULT_PARSER = RFC3986_PARSER
23
26
Ractor . make_shareable ( DEFAULT_PARSER ) if defined? ( Ractor )
24
27
28
+ # Set the default parser instance.
25
29
def self . parser = ( parser = RFC3986_PARSER )
26
30
remove_const ( :Parser ) if defined? ( ::URI ::Parser )
27
31
const_set ( "Parser" , parser . class )
@@ -40,7 +44,7 @@ def self.parser=(parser = RFC3986_PARSER)
40
44
end
41
45
self . parser = RFC3986_PARSER
42
46
43
- def self . const_missing ( const )
47
+ def self . const_missing ( const ) # :nodoc:
44
48
if const == :REGEXP
45
49
warn "URI::REGEXP is obsolete. Use URI::RFC2396_REGEXP explicitly." , uplevel : 1 if $VERBOSE
46
50
URI ::RFC2396_REGEXP
@@ -87,7 +91,7 @@ def make_components_hash(klass, array_hash)
87
91
module_function :make_components_hash
88
92
end
89
93
90
- module Schemes
94
+ module Schemes # :nodoc:
91
95
end
92
96
private_constant :Schemes
93
97
@@ -305,7 +309,7 @@ def self.regexp(schemes = nil)# :nodoc:
305
309
256 . times do |i |
306
310
TBLENCWWWCOMP_ [ -i . chr ] = -( '%%%02X' % i )
307
311
end
308
- TBLENCURICOMP_ = TBLENCWWWCOMP_ . dup . freeze
312
+ TBLENCURICOMP_ = TBLENCWWWCOMP_ . dup . freeze # :nodoc:
309
313
TBLENCWWWCOMP_ [ ' ' ] = '+'
310
314
TBLENCWWWCOMP_ . freeze
311
315
TBLDECWWWCOMP_ = { } # :nodoc:
0 commit comments