@@ -159,9 +159,11 @@ def self.scheme_list
159159 Schemes . list
160160 end
161161
162+ # :stopdoc:
162163 INITIAL_SCHEMES = scheme_list
163164 private_constant :INITIAL_SCHEMES
164165 Ractor . make_shareable ( INITIAL_SCHEMES ) if defined? ( Ractor )
166+ # :startdoc:
165167
166168 # Returns a new object constructed from the given +scheme+, +arguments+,
167169 # and +default+:
@@ -437,6 +439,8 @@ def self.decode_uri_component(str, enc=Encoding::UTF_8)
437439 _decode_uri_component ( /%\h \h / , str , enc )
438440 end
439441
442+ # Returns a string derived from the given string +str+ with
443+ # URI-encoded characters matching +regexp+ according to +table+.
440444 def self . _encode_uri_component ( regexp , table , str , enc )
441445 str = str . to_s . dup
442446 if str . encoding != Encoding ::ASCII_8BIT
@@ -451,6 +455,8 @@ def self._encode_uri_component(regexp, table, str, enc)
451455 end
452456 private_class_method :_encode_uri_component
453457
458+ # Returns a string decoding characters matching +regexp+ from the
459+ # given \URL-encoded string +str+.
454460 def self . _decode_uri_component ( regexp , str , enc )
455461 raise ArgumentError , "invalid %-encoding (#{ str } )" if /%(?!\h \h )/ . match? ( str )
456462 str . b . gsub ( regexp , TBLDECWWWCOMP_ ) . force_encoding ( enc )
0 commit comments