rbs 2.0.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/comments.yml +34 -0
  3. data/.github/workflows/ruby.yml +5 -0
  4. data/CHANGELOG.md +82 -0
  5. data/README.md +6 -1
  6. data/Rakefile +56 -21
  7. data/core/array.rbs +2866 -1086
  8. data/core/basic_object.rbs +150 -30
  9. data/core/binding.rbs +33 -0
  10. data/core/builtin.rbs +4 -4
  11. data/core/class.rbs +43 -5
  12. data/core/comparable.rbs +57 -0
  13. data/core/complex.rbs +170 -4
  14. data/core/constants.rbs +51 -0
  15. data/core/deprecated.rbs +7 -0
  16. data/core/dir.rbs +305 -20
  17. data/core/encoding.rbs +1214 -77
  18. data/core/enumerable.rbs +2173 -234
  19. data/core/enumerator.rbs +448 -182
  20. data/core/env.rbs +448 -1
  21. data/core/errno.rbs +1 -10
  22. data/core/errors.rbs +152 -2
  23. data/core/exception.rbs +201 -127
  24. data/core/false_class.rbs +27 -0
  25. data/core/fiber.rbs +118 -37
  26. data/core/fiber_error.rbs +8 -9
  27. data/core/file.rbs +1060 -142
  28. data/core/file_test.rbs +287 -32
  29. data/core/float.rbs +776 -300
  30. data/core/gc.rbs +185 -34
  31. data/core/global_variables.rbs +5 -1
  32. data/core/hash.rbs +1582 -649
  33. data/core/integer.rbs +974 -204
  34. data/core/io/buffer.rbs +710 -0
  35. data/core/io/wait.rbs +29 -8
  36. data/core/io.rbs +2438 -417
  37. data/core/kernel.rbs +2319 -318
  38. data/core/marshal.rbs +37 -2
  39. data/core/match_data.rbs +123 -6
  40. data/core/math.rbs +126 -6
  41. data/core/method.rbs +226 -102
  42. data/core/module.rbs +421 -45
  43. data/core/nil_class.rbs +64 -0
  44. data/core/numeric.rbs +620 -142
  45. data/core/object.rbs +453 -81
  46. data/core/object_space.rbs +92 -2
  47. data/core/proc.rbs +482 -285
  48. data/core/process.rbs +443 -34
  49. data/core/ractor.rbs +232 -9
  50. data/core/random.rbs +151 -52
  51. data/core/range.rbs +885 -160
  52. data/core/rational.rbs +122 -6
  53. data/core/rb_config.rbs +14 -4
  54. data/core/refinement.rbs +44 -0
  55. data/core/regexp.rbs +156 -14
  56. data/core/ruby_vm.rbs +42 -3
  57. data/core/signal.rbs +78 -39
  58. data/core/string.rbs +2123 -567
  59. data/core/string_io.rbs +204 -0
  60. data/core/struct.rbs +283 -28
  61. data/core/symbol.rbs +304 -30
  62. data/core/thread.rbs +1288 -688
  63. data/core/thread_group.rbs +66 -10
  64. data/core/time.rbs +643 -217
  65. data/core/trace_point.rbs +100 -12
  66. data/core/true_class.rbs +24 -0
  67. data/core/unbound_method.rbs +73 -7
  68. data/core/warning.rbs +37 -12
  69. data/docs/CONTRIBUTING.md +40 -34
  70. data/docs/stdlib.md +3 -102
  71. data/docs/syntax.md +54 -11
  72. data/ext/rbs_extension/extconf.rb +1 -0
  73. data/ext/rbs_extension/lexer.h +5 -0
  74. data/ext/rbs_extension/lexstate.c +6 -0
  75. data/ext/rbs_extension/parser.c +85 -10
  76. data/ext/rbs_extension/ruby_objs.c +4 -2
  77. data/ext/rbs_extension/ruby_objs.h +2 -2
  78. data/goodcheck.yml +0 -11
  79. data/lib/rbs/annotate/annotations.rb +197 -0
  80. data/lib/rbs/annotate/formatter.rb +80 -0
  81. data/lib/rbs/annotate/rdoc_annotator.rb +398 -0
  82. data/lib/rbs/annotate/rdoc_source.rb +120 -0
  83. data/lib/rbs/annotate.rb +6 -0
  84. data/lib/rbs/ast/members.rb +21 -13
  85. data/lib/rbs/buffer.rb +17 -11
  86. data/lib/rbs/cli.rb +48 -1
  87. data/lib/rbs/definition_builder/method_builder.rb +28 -16
  88. data/lib/rbs/definition_builder.rb +6 -2
  89. data/lib/rbs/environment.rb +8 -4
  90. data/lib/rbs/location_aux.rb +12 -0
  91. data/lib/rbs/namespace.rb +1 -1
  92. data/lib/rbs/prototype/rb.rb +12 -0
  93. data/lib/rbs/type_alias_regularity.rb +6 -4
  94. data/lib/rbs/type_name.rb +1 -1
  95. data/lib/rbs/types.rb +1 -1
  96. data/lib/rbs/validator.rb +6 -0
  97. data/lib/rbs/version.rb +1 -1
  98. data/lib/rbs/writer.rb +54 -4
  99. data/lib/rbs.rb +0 -2
  100. data/schema/typeParam.json +3 -3
  101. data/sig/annotate/annotations.rbs +102 -0
  102. data/sig/annotate/formatter.rbs +24 -0
  103. data/sig/annotate/rdoc_annotater.rbs +82 -0
  104. data/sig/annotate/rdoc_source.rbs +30 -0
  105. data/sig/buffer.rbs +6 -2
  106. data/sig/cli.rbs +2 -0
  107. data/sig/collection/{collections.rbs → sources.rbs} +0 -0
  108. data/sig/location.rbs +6 -0
  109. data/sig/members.rbs +24 -18
  110. data/sig/method_builder.rbs +5 -4
  111. data/sig/method_types.rbs +5 -1
  112. data/sig/polyfill.rbs +78 -0
  113. data/sig/validator.rbs +3 -1
  114. data/sig/writer.rbs +79 -2
  115. data/stdlib/abbrev/0/abbrev.rbs +6 -0
  116. data/stdlib/abbrev/0/array.rbs +26 -0
  117. data/stdlib/base64/0/base64.rbs +31 -0
  118. data/stdlib/benchmark/0/benchmark.rbs +74 -3
  119. data/stdlib/bigdecimal/0/big_decimal.rbs +614 -165
  120. data/stdlib/bigdecimal-math/0/big_math.rbs +41 -64
  121. data/stdlib/cgi/0/core.rbs +649 -21
  122. data/stdlib/coverage/0/coverage.rbs +164 -2
  123. data/stdlib/csv/0/csv.rbs +2862 -398
  124. data/stdlib/date/0/date.rbs +483 -25
  125. data/stdlib/date/0/date_time.rbs +187 -12
  126. data/stdlib/dbm/0/dbm.rbs +152 -17
  127. data/stdlib/digest/0/digest.rbs +146 -0
  128. data/stdlib/erb/0/erb.rbs +65 -245
  129. data/stdlib/fiber/0/fiber.rbs +73 -91
  130. data/stdlib/fileutils/0/fileutils.rbs +301 -1
  131. data/stdlib/find/0/find.rbs +9 -0
  132. data/stdlib/forwardable/0/forwardable.rbs +65 -1
  133. data/stdlib/io-console/0/io-console.rbs +227 -15
  134. data/stdlib/ipaddr/0/ipaddr.rbs +161 -0
  135. data/stdlib/json/0/json.rbs +1147 -145
  136. data/stdlib/logger/0/formatter.rbs +24 -0
  137. data/stdlib/logger/0/log_device.rbs +64 -0
  138. data/stdlib/logger/0/logger.rbs +165 -13
  139. data/stdlib/logger/0/period.rbs +10 -0
  140. data/stdlib/logger/0/severity.rbs +26 -0
  141. data/stdlib/monitor/0/monitor.rbs +163 -0
  142. data/stdlib/mutex_m/0/mutex_m.rbs +35 -6
  143. data/stdlib/net-http/0/manifest.yaml +1 -0
  144. data/stdlib/net-http/0/net-http.rbs +1513 -683
  145. data/stdlib/nkf/0/nkf.rbs +372 -0
  146. data/stdlib/objspace/0/objspace.rbs +149 -90
  147. data/stdlib/openssl/0/openssl.rbs +8108 -71
  148. data/stdlib/optparse/0/optparse.rbs +487 -19
  149. data/stdlib/pathname/0/pathname.rbs +425 -124
  150. data/stdlib/prettyprint/0/prettyprint.rbs +120 -99
  151. data/stdlib/prime/0/integer-extension.rbs +20 -2
  152. data/stdlib/prime/0/prime.rbs +88 -21
  153. data/stdlib/pstore/0/pstore.rbs +102 -0
  154. data/stdlib/pty/0/pty.rbs +64 -14
  155. data/stdlib/resolv/0/resolv.rbs +420 -31
  156. data/stdlib/rubygems/0/basic_specification.rbs +4 -1
  157. data/stdlib/rubygems/0/config_file.rbs +33 -1
  158. data/stdlib/rubygems/0/dependency_installer.rbs +4 -3
  159. data/stdlib/rubygems/0/installer.rbs +13 -1
  160. data/stdlib/rubygems/0/path_support.rbs +4 -1
  161. data/stdlib/rubygems/0/platform.rbs +5 -1
  162. data/stdlib/rubygems/0/request_set.rbs +44 -2
  163. data/stdlib/rubygems/0/requirement.rbs +65 -2
  164. data/stdlib/rubygems/0/rubygems.rbs +407 -0
  165. data/stdlib/rubygems/0/source_list.rbs +13 -0
  166. data/stdlib/rubygems/0/specification.rbs +21 -1
  167. data/stdlib/rubygems/0/stream_ui.rbs +3 -1
  168. data/stdlib/rubygems/0/uninstaller.rbs +8 -1
  169. data/stdlib/rubygems/0/version.rbs +60 -157
  170. data/stdlib/securerandom/0/securerandom.rbs +44 -0
  171. data/stdlib/set/0/set.rbs +423 -109
  172. data/stdlib/shellwords/0/shellwords.rbs +55 -77
  173. data/stdlib/singleton/0/singleton.rbs +20 -0
  174. data/stdlib/socket/0/addrinfo.rbs +210 -9
  175. data/stdlib/socket/0/basic_socket.rbs +103 -11
  176. data/stdlib/socket/0/ip_socket.rbs +31 -9
  177. data/stdlib/socket/0/socket.rbs +586 -38
  178. data/stdlib/socket/0/tcp_server.rbs +22 -2
  179. data/stdlib/socket/0/tcp_socket.rbs +12 -1
  180. data/stdlib/socket/0/udp_socket.rbs +25 -2
  181. data/stdlib/socket/0/unix_server.rbs +22 -2
  182. data/stdlib/socket/0/unix_socket.rbs +45 -5
  183. data/stdlib/strscan/0/string_scanner.rbs +210 -9
  184. data/stdlib/tempfile/0/tempfile.rbs +58 -10
  185. data/stdlib/time/0/time.rbs +208 -116
  186. data/stdlib/timeout/0/timeout.rbs +10 -0
  187. data/stdlib/tmpdir/0/tmpdir.rbs +13 -4
  188. data/stdlib/tsort/0/cyclic.rbs +1 -0
  189. data/stdlib/tsort/0/interfaces.rbs +1 -0
  190. data/stdlib/tsort/0/tsort.rbs +42 -0
  191. data/stdlib/uri/0/common.rbs +57 -8
  192. data/stdlib/uri/0/file.rbs +55 -109
  193. data/stdlib/uri/0/ftp.rbs +6 -3
  194. data/stdlib/uri/0/generic.rbs +558 -329
  195. data/stdlib/uri/0/http.rbs +60 -114
  196. data/stdlib/uri/0/https.rbs +8 -102
  197. data/stdlib/uri/0/ldap.rbs +143 -137
  198. data/stdlib/uri/0/ldaps.rbs +8 -102
  199. data/stdlib/uri/0/mailto.rbs +3 -0
  200. data/stdlib/uri/0/rfc2396_parser.rbs +66 -26
  201. data/stdlib/uri/0/ws.rbs +6 -3
  202. data/stdlib/uri/0/wss.rbs +5 -3
  203. data/stdlib/yaml/0/dbm.rbs +151 -87
  204. data/stdlib/yaml/0/store.rbs +6 -0
  205. data/stdlib/zlib/0/zlib.rbs +90 -31
  206. metadata +18 -6
  207. data/lib/rbs/location.rb +0 -221
  208. data/sig/char_scanner.rbs +0 -9
@@ -1,3 +1,4 @@
1
+ # <!-- rdoc-file=lib/uri.rb -->
1
2
  # URI is a module providing classes to handle Uniform Resource Identifiers
2
3
  # ([RFC2396](http://tools.ietf.org/html/rfc2396)).
3
4
  #
@@ -30,7 +31,7 @@
30
31
  # class RSYNC < Generic
31
32
  # DEFAULT_PORT = 873
32
33
  # end
33
- # @@schemes['RSYNC'] = RSYNC
34
+ # register_scheme 'RSYNC', RSYNC
34
35
  # end
35
36
  # #=> URI::RSYNC
36
37
  #
@@ -75,7 +76,6 @@
75
76
  # * URI::REGEXP::PATTERN - (in uri/common.rb)
76
77
  #
77
78
  # * URI::Util - (in uri/common.rb)
78
- # * URI::Escape - (in uri/common.rb)
79
79
  # * URI::Error - (in uri/common.rb)
80
80
  # * URI::InvalidURIError - (in uri/common.rb)
81
81
  # * URI::InvalidComponentError - (in uri/common.rb)
@@ -93,12 +93,14 @@
93
93
  # License
94
94
  # : Copyright (c) 2001 akira yamada <akira@ruby-lang.org> You can redistribute
95
95
  # it and/or modify it under the same term as Ruby.
96
- # Revision
97
- # : $Id$
98
96
  #
99
97
  module URI
100
98
  include URI::RFC2396_REGEXP
101
99
 
100
+ # <!--
101
+ # rdoc-file=lib/uri/common.rb
102
+ # - decode_www_form(str, enc=Encoding::UTF_8, separator: '&', use__charset_: false, isindex: false)
103
+ # -->
102
104
  # Decodes URL-encoded form data from given `str`.
103
105
  #
104
106
  # This decodes application/x-www-form-urlencoded data and returns an array of
@@ -118,6 +120,10 @@ module URI
118
120
  #
119
121
  def self.decode_www_form: (String str, ?encoding enc, ?isindex: boolish, ?use__charset_: boolish, ?separator: String) -> Array[[ String, String ]]
120
122
 
123
+ # <!--
124
+ # rdoc-file=lib/uri/common.rb
125
+ # - decode_www_form_component(str, enc=Encoding::UTF_8)
126
+ # -->
121
127
  # Decodes given `str` of URL-encoded form data.
122
128
  #
123
129
  # This decodes + to SP.
@@ -126,6 +132,10 @@ module URI
126
132
  #
127
133
  def self.decode_www_form_component: (String str, ?encoding enc) -> String
128
134
 
135
+ # <!--
136
+ # rdoc-file=lib/uri/common.rb
137
+ # - encode_www_form(enum, enc=nil)
138
+ # -->
129
139
  # Generates URL-encoded form data from given `enum`.
130
140
  #
131
141
  # This generates application/x-www-form-urlencoded data defined in HTML5 from
@@ -141,7 +151,7 @@ module URI
141
151
  # This method doesn't handle files. When you send a file, use
142
152
  # multipart/form-data.
143
153
  #
144
- # This refers http://url.spec.whatwg.org/#concept-urlencoded-serializer
154
+ # This refers https://url.spec.whatwg.org/#concept-urlencoded-serializer
145
155
  #
146
156
  # URI.encode_www_form([["q", "ruby"], ["lang", "en"]])
147
157
  # #=> "q=ruby&lang=en"
@@ -156,6 +166,10 @@ module URI
156
166
  #
157
167
  def self.encode_www_form: (Enumerable[[ _ToS, _ToS ]] enum, ?encoding? enc) -> String
158
168
 
169
+ # <!--
170
+ # rdoc-file=lib/uri/common.rb
171
+ # - encode_www_form_component(str, enc=nil)
172
+ # -->
159
173
  # Encodes given `str` to URL-encoded form data.
160
174
  #
161
175
  # This method doesn't convert *, -, ., 0-9, A-Z, _, a-z, but does convert SP
@@ -164,12 +178,16 @@ module URI
164
178
  # If `enc` is given, convert `str` to the encoding before percent encoding.
165
179
  #
166
180
  # This is an implementation of
167
- # http://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data.
181
+ # https://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data.
168
182
  #
169
183
  # See URI.decode_www_form_component, URI.encode_www_form.
170
184
  #
171
185
  def self.encode_www_form_component: (_ToS str, ?encoding? enc) -> String
172
186
 
187
+ # <!--
188
+ # rdoc-file=lib/uri/common.rb
189
+ # - extract(str, schemes = nil, &block)
190
+ # -->
173
191
  # ## Synopsis
174
192
  #
175
193
  # URI::extract(str[, schemes][,&blk])
@@ -199,6 +217,10 @@ module URI
199
217
 
200
218
  def self.get_encoding: (String label) -> Encoding?
201
219
 
220
+ # <!--
221
+ # rdoc-file=lib/uri/common.rb
222
+ # - join(*str)
223
+ # -->
202
224
  # ## Synopsis
203
225
  #
204
226
  # URI::join(str[, str, ...])
@@ -234,6 +256,10 @@ module URI
234
256
  #
235
257
  def self.join: (String str, *String strs) -> URI::Generic
236
258
 
259
+ # <!--
260
+ # rdoc-file=lib/uri/common.rb
261
+ # - parse(uri)
262
+ # -->
237
263
  # ## Synopsis
238
264
  #
239
265
  # URI::parse(uri_str)
@@ -270,6 +296,10 @@ module URI
270
296
  #
271
297
  def self.parse: (_ToStr uri) -> (File | FTP | HTTP | HTTPS | LDAP | LDAPS | MailTo | WS | WSS | Generic)
272
298
 
299
+ # <!--
300
+ # rdoc-file=lib/uri/common.rb
301
+ # - regexp(schemes = nil)
302
+ # -->
273
303
  # ## Synopsis
274
304
  #
275
305
  # URI::regexp([match_schemes])
@@ -285,7 +315,7 @@ module URI
285
315
  #
286
316
  # Returns a Regexp object which matches to URI-like strings. The Regexp object
287
317
  # returned by this method includes arbitrary number of capture group
288
- # (parentheses). Never rely on it's number.
318
+ # (parentheses). Never rely on its number.
289
319
  #
290
320
  # ## Usage
291
321
  #
@@ -304,15 +334,27 @@ module URI
304
334
  #
305
335
  def self.regexp: (?Array[String]? schemes) -> Regexp
306
336
 
337
+ # <!--
338
+ # rdoc-file=lib/uri/common.rb
339
+ # - scheme_list()
340
+ # -->
307
341
  # Returns a Hash of the defined schemes.
308
342
  #
309
343
  def self.scheme_list: () -> Hash[String, Class]
310
344
 
345
+ # <!--
346
+ # rdoc-file=lib/uri/common.rb
347
+ # - for(scheme, *arguments, default: Generic)
348
+ # -->
311
349
  # Construct a URI instance, using the scheme to detect the appropriate class
312
- # from +URI.scheme_list+.
350
+ # from `URI.scheme_list`.
313
351
  #
314
352
  def self.for: (String scheme, *untyped arguments, ?default: Class) -> (File | FTP | HTTP | HTTPS | LDAP | LDAPS | MailTo | WS | WSS | Generic)
315
353
 
354
+ # <!--
355
+ # rdoc-file=lib/uri/common.rb
356
+ # - split(uri)
357
+ # -->
316
358
  # ## Synopsis
317
359
  #
318
360
  # URI::split(uri)
@@ -354,7 +396,9 @@ URI::ABS_URI: Regexp
354
396
 
355
397
  URI::ABS_URI_REF: Regexp
356
398
 
399
+ # <!-- rdoc-file=lib/uri/common.rb -->
357
400
  # URI::Parser.new
401
+ #
358
402
  URI::DEFAULT_PARSER: URI::RFC2396_Parser
359
403
 
360
404
  URI::ESCAPED: Regexp
@@ -397,9 +441,14 @@ URI::VERSION_CODE: String
397
441
 
398
442
  URI::WEB_ENCODINGS_: Hash[String, String]
399
443
 
444
+ %a{annotate:rdoc:skip}
400
445
  module Kernel
401
446
  private
402
447
 
448
+ # <!--
449
+ # rdoc-file=lib/uri/common.rb
450
+ # - URI(uri)
451
+ # -->
403
452
  # Returns `uri` converted to an URI object.
404
453
  #
405
454
  def self?.URI: (URI::Generic | String uri) -> URI::Generic
@@ -1,127 +1,34 @@
1
- # URI is a module providing classes to handle Uniform Resource Identifiers
2
- # ([RFC2396](http://tools.ietf.org/html/rfc2396)).
3
- #
4
- # ## Features
5
- #
6
- # * Uniform way of handling URIs.
7
- # * Flexibility to introduce custom URI schemes.
8
- # * Flexibility to have an alternate URI::Parser (or just different patterns
9
- # and regexp's).
10
- #
11
- #
12
- # ## Basic example
13
- #
14
- # require 'uri'
15
- #
16
- # uri = URI("http://foo.com/posts?id=30&limit=5#time=1305298413")
17
- # #=> #<URI::HTTP http://foo.com/posts?id=30&limit=5#time=1305298413>
18
- #
19
- # uri.scheme #=> "http"
20
- # uri.host #=> "foo.com"
21
- # uri.path #=> "/posts"
22
- # uri.query #=> "id=30&limit=5"
23
- # uri.fragment #=> "time=1305298413"
24
- #
25
- # uri.to_s #=> "http://foo.com/posts?id=30&limit=5#time=1305298413"
26
- #
27
- # ## Adding custom URIs
28
- #
29
- # module URI
30
- # class RSYNC < Generic
31
- # DEFAULT_PORT = 873
32
- # end
33
- # @@schemes['RSYNC'] = RSYNC
34
- # end
35
- # #=> URI::RSYNC
36
- #
37
- # URI.scheme_list
38
- # #=> {"FILE"=>URI::File, "FTP"=>URI::FTP, "HTTP"=>URI::HTTP,
39
- # # "HTTPS"=>URI::HTTPS, "LDAP"=>URI::LDAP, "LDAPS"=>URI::LDAPS,
40
- # # "MAILTO"=>URI::MailTo, "RSYNC"=>URI::RSYNC}
41
- #
42
- # uri = URI("rsync://rsync.foo.com")
43
- # #=> #<URI::RSYNC rsync://rsync.foo.com>
44
- #
45
- # ## RFC References
46
- #
47
- # A good place to view an RFC spec is http://www.ietf.org/rfc.html.
48
- #
49
- # Here is a list of all related RFC's:
50
- # * [RFC822](http://tools.ietf.org/html/rfc822)
51
- # * [RFC1738](http://tools.ietf.org/html/rfc1738)
52
- # * [RFC2255](http://tools.ietf.org/html/rfc2255)
53
- # * [RFC2368](http://tools.ietf.org/html/rfc2368)
54
- # * [RFC2373](http://tools.ietf.org/html/rfc2373)
55
- # * [RFC2396](http://tools.ietf.org/html/rfc2396)
56
- # * [RFC2732](http://tools.ietf.org/html/rfc2732)
57
- # * [RFC3986](http://tools.ietf.org/html/rfc3986)
58
- #
59
- #
60
- # ## Class tree
61
- #
62
- # * URI::Generic (in uri/generic.rb)
63
- # * URI::File - (in uri/file.rb)
64
- # * URI::FTP - (in uri/ftp.rb)
65
- # * URI::HTTP - (in uri/http.rb)
66
- # * URI::HTTPS - (in uri/https.rb)
67
- #
68
- # * URI::LDAP - (in uri/ldap.rb)
69
- # * URI::LDAPS - (in uri/ldaps.rb)
70
- #
71
- # * URI::MailTo - (in uri/mailto.rb)
72
- #
73
- # * URI::Parser - (in uri/common.rb)
74
- # * URI::REGEXP - (in uri/common.rb)
75
- # * URI::REGEXP::PATTERN - (in uri/common.rb)
76
- #
77
- # * URI::Util - (in uri/common.rb)
78
- # * URI::Escape - (in uri/common.rb)
79
- # * URI::Error - (in uri/common.rb)
80
- # * URI::InvalidURIError - (in uri/common.rb)
81
- # * URI::InvalidComponentError - (in uri/common.rb)
82
- # * URI::BadURIError - (in uri/common.rb)
83
- #
84
- #
85
- #
86
- # ## Copyright Info
87
- #
88
- # Author
89
- # : Akira Yamada <akira@ruby-lang.org>
90
- # Documentation
91
- # : Akira Yamada <akira@ruby-lang.org> Dmitry V. Sabanin <sdmitry@lrn.ru>
92
- # Vincent Batts <vbatts@hashbangbash.com>
93
- # License
94
- # : Copyright (c) 2001 akira yamada <akira@ruby-lang.org> You can redistribute
95
- # it and/or modify it under the same term as Ruby.
96
- # Revision
97
- # : $Id$
98
- #
99
- #
1
+ %a{annotate:rdoc:skip}
100
2
  module URI
101
- #
3
+ # <!-- rdoc-file=lib/uri/file.rb -->
102
4
  # The "file" URI is defined by RFC8089.
103
5
  #
104
6
  class File < Generic
7
+ # <!-- rdoc-file=lib/uri/file.rb -->
105
8
  # A Default port of nil for URI::File.
9
+ #
106
10
  DEFAULT_PORT: Integer?
107
11
 
108
- #
12
+ # <!-- rdoc-file=lib/uri/file.rb -->
109
13
  # An Array of the available components for URI::File.
110
14
  #
111
15
  COMPONENT: Array[Symbol]
112
16
 
113
- #
114
- # == Description
17
+ # <!--
18
+ # rdoc-file=lib/uri/file.rb
19
+ # - build(args)
20
+ # -->
21
+ # ## Description
115
22
  #
116
23
  # Creates a new URI::File object from components, with syntax checking.
117
24
  #
118
- # The components accepted are +host+ and +path+.
25
+ # The components accepted are `host` and `path`.
119
26
  #
120
- # The components should be provided either as an Array, or as a Hash
121
- # with keys formed by preceding the component names with a colon.
27
+ # The components should be provided either as an Array, or as a Hash with keys
28
+ # formed by preceding the component names with a colon.
122
29
  #
123
- # If an Array is used, the components must be passed in the
124
- # order <code>[host, path]</code>.
30
+ # If an Array is used, the components must be passed in the order `[host,
31
+ # path]`.
125
32
  #
126
33
  # Examples:
127
34
  #
@@ -137,31 +44,70 @@ module URI
137
44
  def self.build: (Array[String] args) -> URI::File
138
45
  | ({ host: String, path: String }) -> URI::File
139
46
 
140
- # Protected setter for the host component +v+.
47
+ # <!--
48
+ # rdoc-file=lib/uri/file.rb
49
+ # - set_host(v)
50
+ # -->
51
+ # Protected setter for the host component `v`.
141
52
  #
142
53
  # See also URI::Generic.host=.
143
54
  #
144
55
  def set_host: (String? v) -> String
145
56
 
57
+ # <!--
58
+ # rdoc-file=lib/uri/file.rb
59
+ # - set_port(v)
60
+ # -->
146
61
  # do nothing
62
+ #
147
63
  def set_port: (Integer v) -> nil
148
64
 
65
+ # <!--
66
+ # rdoc-file=lib/uri/file.rb
67
+ # - check_userinfo(user)
68
+ # -->
149
69
  # raise InvalidURIError
70
+ #
150
71
  def check_userinfo: (String user) -> nil
151
72
 
73
+ # <!--
74
+ # rdoc-file=lib/uri/file.rb
75
+ # - check_user(user)
76
+ # -->
152
77
  # raise InvalidURIError
78
+ #
153
79
  def check_user: (String user) -> nil
154
80
 
81
+ # <!--
82
+ # rdoc-file=lib/uri/file.rb
83
+ # - check_password(user)
84
+ # -->
155
85
  # raise InvalidURIError
86
+ #
156
87
  def check_password: (String user) -> nil
157
88
 
89
+ # <!--
90
+ # rdoc-file=lib/uri/file.rb
91
+ # - set_userinfo(v)
92
+ # -->
158
93
  # do nothing
94
+ #
159
95
  def set_userinfo: (String v) -> nil
160
96
 
97
+ # <!--
98
+ # rdoc-file=lib/uri/file.rb
99
+ # - set_user(v)
100
+ # -->
161
101
  # do nothing
102
+ #
162
103
  def set_user: (String v) -> nil
163
104
 
105
+ # <!--
106
+ # rdoc-file=lib/uri/file.rb
107
+ # - set_password(v)
108
+ # -->
164
109
  # do nothing
110
+ #
165
111
  def set_password: (String v) -> nil
166
112
  end
167
113
  end
data/stdlib/uri/0/ftp.rbs CHANGED
@@ -1,10 +1,13 @@
1
+ %a{annotate:rdoc:skip}
1
2
  module URI
3
+ # <!-- rdoc-file=lib/uri/ftp.rb -->
2
4
  # FTP URI syntax is defined by RFC1738 section 3.2.
3
5
  #
4
- # This class will be redesigned because of difference of implementations;
5
- # the structure of its path. draft-hoffman-ftp-uri-04 is a draft but it
6
- # is a good summary about the de facto spec.
6
+ # This class will be redesigned because of difference of implementations; the
7
+ # structure of its path. draft-hoffman-ftp-uri-04 is a draft but it is a good
8
+ # summary about the de facto spec.
7
9
  # http://tools.ietf.org/html/draft-hoffman-ftp-uri-04
10
+ #
8
11
  class FTP < Generic
9
12
  end
10
13
  end