rbs 3.10.0 → 4.0.0.dev.1

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 (202) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/comments.yml +3 -3
  3. data/.github/workflows/ruby.yml +24 -35
  4. data/.github/workflows/typecheck.yml +3 -1
  5. data/.github/workflows/windows.yml +2 -2
  6. data/.gitignore +0 -4
  7. data/CHANGELOG.md +0 -88
  8. data/README.md +1 -38
  9. data/Rakefile +20 -142
  10. data/Steepfile +1 -0
  11. data/config.yml +43 -1
  12. data/core/array.rbs +46 -100
  13. data/core/complex.rbs +21 -32
  14. data/core/dir.rbs +2 -2
  15. data/core/encoding.rbs +9 -6
  16. data/core/enumerable.rbs +3 -90
  17. data/core/enumerator.rbs +1 -18
  18. data/core/errno.rbs +0 -8
  19. data/core/errors.rbs +1 -28
  20. data/core/exception.rbs +2 -2
  21. data/core/fiber.rbs +4 -5
  22. data/core/file.rbs +12 -27
  23. data/core/file_test.rbs +1 -1
  24. data/core/float.rbs +22 -209
  25. data/core/gc.rbs +281 -417
  26. data/core/hash.rbs +727 -1024
  27. data/core/integer.rbs +38 -78
  28. data/core/io/buffer.rbs +7 -18
  29. data/core/io/wait.rbs +33 -11
  30. data/core/io.rbs +12 -14
  31. data/core/kernel.rbs +51 -57
  32. data/core/marshal.rbs +1 -1
  33. data/core/match_data.rbs +1 -1
  34. data/core/math.rbs +3 -42
  35. data/core/method.rbs +6 -14
  36. data/core/module.rbs +17 -88
  37. data/core/nil_class.rbs +3 -3
  38. data/core/numeric.rbs +16 -16
  39. data/core/object.rbs +3 -3
  40. data/core/object_space.rbs +15 -21
  41. data/core/proc.rbs +8 -15
  42. data/core/process.rbs +2 -2
  43. data/core/ractor.rbs +437 -278
  44. data/core/range.rbs +8 -7
  45. data/core/rational.rbs +24 -37
  46. data/core/rbs/unnamed/argf.rbs +2 -2
  47. data/core/rbs/unnamed/env_class.rbs +1 -1
  48. data/core/rbs/unnamed/random.rbs +2 -4
  49. data/core/regexp.rbs +20 -25
  50. data/core/ruby_vm.rbs +4 -6
  51. data/core/rubygems/errors.rbs +70 -3
  52. data/core/rubygems/rubygems.rbs +79 -11
  53. data/core/rubygems/version.rbs +3 -2
  54. data/core/set.rbs +359 -488
  55. data/core/string.rbs +1228 -3153
  56. data/core/struct.rbs +1 -1
  57. data/core/symbol.rbs +4 -4
  58. data/core/thread.rbs +29 -92
  59. data/core/time.rbs +9 -35
  60. data/core/trace_point.rbs +4 -7
  61. data/core/unbound_method.rbs +6 -14
  62. data/docs/collection.md +2 -2
  63. data/docs/gem.md +1 -0
  64. data/docs/sigs.md +3 -3
  65. data/ext/rbs_extension/ast_translation.c +1077 -944
  66. data/ext/rbs_extension/ast_translation.h +0 -7
  67. data/ext/rbs_extension/class_constants.c +83 -71
  68. data/ext/rbs_extension/class_constants.h +7 -4
  69. data/ext/rbs_extension/extconf.rb +2 -24
  70. data/ext/rbs_extension/legacy_location.c +172 -173
  71. data/ext/rbs_extension/legacy_location.h +3 -8
  72. data/ext/rbs_extension/main.c +289 -239
  73. data/ext/rbs_extension/rbs_extension.h +0 -3
  74. data/ext/rbs_extension/rbs_string_bridging.h +0 -4
  75. data/include/rbs/ast.h +98 -37
  76. data/include/rbs/defines.h +12 -38
  77. data/include/rbs/lexer.h +114 -126
  78. data/include/rbs/location.h +14 -14
  79. data/include/rbs/parser.h +37 -21
  80. data/include/rbs/string.h +5 -3
  81. data/include/rbs/util/rbs_allocator.h +19 -40
  82. data/include/rbs/util/rbs_assert.h +1 -12
  83. data/include/rbs/util/rbs_constant_pool.h +3 -3
  84. data/include/rbs/util/rbs_encoding.h +1 -3
  85. data/include/rbs/util/rbs_unescape.h +1 -2
  86. data/lib/rbs/ast/ruby/annotations.rb +119 -0
  87. data/lib/rbs/ast/ruby/comment_block.rb +221 -0
  88. data/lib/rbs/ast/ruby/declarations.rb +86 -0
  89. data/lib/rbs/ast/ruby/helpers/constant_helper.rb +24 -0
  90. data/lib/rbs/ast/ruby/helpers/location_helper.rb +15 -0
  91. data/lib/rbs/ast/ruby/members.rb +213 -0
  92. data/lib/rbs/buffer.rb +104 -24
  93. data/lib/rbs/cli/validate.rb +40 -35
  94. data/lib/rbs/cli.rb +5 -6
  95. data/lib/rbs/collection/config/lockfile_generator.rb +0 -1
  96. data/lib/rbs/collection.rb +0 -1
  97. data/lib/rbs/definition.rb +6 -1
  98. data/lib/rbs/definition_builder/ancestor_builder.rb +65 -62
  99. data/lib/rbs/definition_builder/method_builder.rb +45 -30
  100. data/lib/rbs/definition_builder.rb +44 -9
  101. data/lib/rbs/environment/class_entry.rb +69 -0
  102. data/lib/rbs/environment/module_entry.rb +66 -0
  103. data/lib/rbs/environment.rb +244 -218
  104. data/lib/rbs/environment_loader.rb +3 -3
  105. data/lib/rbs/errors.rb +5 -4
  106. data/lib/rbs/inline_parser/comment_association.rb +117 -0
  107. data/lib/rbs/inline_parser.rb +206 -0
  108. data/lib/rbs/location_aux.rb +35 -3
  109. data/lib/rbs/parser_aux.rb +11 -6
  110. data/lib/rbs/prototype/runtime.rb +2 -2
  111. data/lib/rbs/resolver/constant_resolver.rb +2 -2
  112. data/lib/rbs/resolver/type_name_resolver.rb +38 -124
  113. data/lib/rbs/source.rb +99 -0
  114. data/lib/rbs/subtractor.rb +4 -3
  115. data/lib/rbs/test/type_check.rb +0 -14
  116. data/lib/rbs/types.rb +1 -3
  117. data/lib/rbs/version.rb +1 -1
  118. data/lib/rbs.rb +13 -1
  119. data/lib/rdoc/discover.rb +1 -1
  120. data/lib/rdoc_plugin/parser.rb +1 -1
  121. data/rbs.gemspec +1 -0
  122. data/sig/ancestor_builder.rbs +1 -1
  123. data/sig/ast/ruby/annotations.rbs +110 -0
  124. data/sig/ast/ruby/comment_block.rbs +119 -0
  125. data/sig/ast/ruby/declarations.rbs +60 -0
  126. data/sig/ast/ruby/helpers/constant_helper.rbs +11 -0
  127. data/sig/ast/ruby/helpers/location_helper.rbs +15 -0
  128. data/sig/ast/ruby/members.rbs +72 -0
  129. data/sig/buffer.rbs +63 -5
  130. data/sig/definition.rbs +1 -0
  131. data/sig/definition_builder.rbs +1 -1
  132. data/sig/environment/class_entry.rbs +50 -0
  133. data/sig/environment/module_entry.rbs +50 -0
  134. data/sig/environment.rbs +28 -133
  135. data/sig/errors.rbs +13 -6
  136. data/sig/inline_parser/comment_association.rbs +71 -0
  137. data/sig/inline_parser.rbs +87 -0
  138. data/sig/location.rbs +32 -7
  139. data/sig/manifest.yaml +1 -0
  140. data/sig/method_builder.rbs +7 -4
  141. data/sig/parser.rbs +16 -20
  142. data/sig/resolver/type_name_resolver.rbs +7 -38
  143. data/sig/source.rbs +48 -0
  144. data/sig/types.rbs +1 -4
  145. data/src/ast.c +290 -201
  146. data/src/lexer.c +2813 -2902
  147. data/src/lexer.re +4 -0
  148. data/src/lexstate.c +155 -169
  149. data/src/location.c +40 -40
  150. data/src/parser.c +2665 -2433
  151. data/src/string.c +48 -0
  152. data/src/util/rbs_allocator.c +77 -80
  153. data/src/util/rbs_assert.c +10 -10
  154. data/src/util/rbs_buffer.c +2 -2
  155. data/src/util/rbs_constant_pool.c +15 -13
  156. data/src/util/rbs_encoding.c +4062 -20097
  157. data/src/util/rbs_unescape.c +48 -85
  158. data/stdlib/bigdecimal/0/big_decimal.rbs +82 -100
  159. data/stdlib/bigdecimal-math/0/big_math.rbs +8 -169
  160. data/stdlib/cgi/0/core.rbs +396 -2
  161. data/stdlib/cgi/0/manifest.yaml +0 -1
  162. data/stdlib/coverage/0/coverage.rbs +1 -3
  163. data/stdlib/date/0/date.rbs +59 -67
  164. data/stdlib/date/0/date_time.rbs +1 -1
  165. data/stdlib/delegate/0/delegator.rbs +7 -10
  166. data/stdlib/erb/0/erb.rbs +347 -737
  167. data/stdlib/fileutils/0/fileutils.rbs +13 -18
  168. data/stdlib/forwardable/0/forwardable.rbs +0 -3
  169. data/stdlib/json/0/json.rbs +48 -68
  170. data/stdlib/net-http/0/net-http.rbs +0 -3
  171. data/stdlib/objspace/0/objspace.rbs +4 -9
  172. data/stdlib/open-uri/0/open-uri.rbs +0 -40
  173. data/stdlib/openssl/0/openssl.rbs +228 -331
  174. data/stdlib/optparse/0/optparse.rbs +3 -3
  175. data/{core → stdlib/pathname/0}/pathname.rbs +355 -255
  176. data/stdlib/psych/0/psych.rbs +3 -3
  177. data/stdlib/rdoc/0/rdoc.rbs +1 -1
  178. data/stdlib/resolv/0/resolv.rbs +68 -25
  179. data/stdlib/ripper/0/ripper.rbs +2 -5
  180. data/stdlib/singleton/0/singleton.rbs +0 -3
  181. data/stdlib/socket/0/socket.rbs +1 -13
  182. data/stdlib/socket/0/tcp_socket.rbs +2 -10
  183. data/stdlib/stringio/0/stringio.rbs +85 -1176
  184. data/stdlib/strscan/0/string_scanner.rbs +31 -31
  185. data/stdlib/tempfile/0/tempfile.rbs +3 -3
  186. data/stdlib/time/0/time.rbs +1 -1
  187. data/stdlib/timeout/0/timeout.rbs +7 -63
  188. data/stdlib/tsort/0/cyclic.rbs +0 -3
  189. data/stdlib/uri/0/common.rbs +2 -11
  190. data/stdlib/uri/0/file.rbs +1 -1
  191. data/stdlib/uri/0/generic.rbs +16 -17
  192. data/stdlib/uri/0/rfc2396_parser.rbs +7 -6
  193. data/stdlib/zlib/0/zstream.rbs +0 -1
  194. metadata +40 -12
  195. data/.clang-format +0 -74
  196. data/.clangd +0 -2
  197. data/.github/workflows/c-check.yml +0 -54
  198. data/core/ruby.rbs +0 -53
  199. data/docs/aliases.md +0 -79
  200. data/docs/encoding.md +0 -56
  201. data/ext/rbs_extension/compat.h +0 -10
  202. data/stdlib/cgi-escape/0/escape.rbs +0 -153
@@ -5,7 +5,7 @@
5
5
  #
6
6
  # * You need both dates and times; Date handles only dates.
7
7
  # * You need only Gregorian dates (and not Julian dates); see [Julian and
8
- # Gregorian Calendars](rdoc-ref:language/calendars.rdoc).
8
+ # Gregorian Calendars](rdoc-ref:date/calendars.rdoc).
9
9
  #
10
10
  # A Date object, once created, is immutable, and cannot be modified.
11
11
  #
@@ -53,7 +53,7 @@
53
53
  #
54
54
  # See also the specialized methods in ["Specialized Format Strings" in Formats
55
55
  # for Dates and
56
- # Times](rdoc-ref:language/strftime_formatting.rdoc@Specialized+Format+Strings)
56
+ # Times](rdoc-ref:strftime_formatting.rdoc@Specialized+Format+Strings)
57
57
  #
58
58
  # ## Argument `limit`
59
59
  #
@@ -88,7 +88,7 @@ class Date
88
88
  # number of days in the month; when the argument is negative, counts backward
89
89
  # from the end of the month.
90
90
  #
91
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
91
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
92
92
  #
93
93
  # Related: Date.jd.
94
94
  #
@@ -101,7 +101,7 @@ class Date
101
101
  # - Date._httpdate(string, limit: 128) -> hash
102
102
  # -->
103
103
  # Returns a hash of values parsed from `string`, which should be a valid [HTTP
104
- # date format](rdoc-ref:language/strftime_formatting.rdoc@HTTP+Format):
104
+ # date format](rdoc-ref:strftime_formatting.rdoc@HTTP+Format):
105
105
  #
106
106
  # d = Date.new(2001, 2, 3)
107
107
  # s = d.httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
@@ -118,8 +118,7 @@ class Date
118
118
  # -->
119
119
  # Returns a hash of values parsed from `string`, which should contain an [ISO
120
120
  # 8601 formatted
121
- # date](rdoc-ref:language/strftime_formatting.rdoc@ISO+8601+Format+Specification
122
- # s):
121
+ # date](rdoc-ref:strftime_formatting.rdoc@ISO+8601+Format+Specifications):
123
122
  #
124
123
  # d = Date.new(2001, 2, 3)
125
124
  # s = d.iso8601 # => "2001-02-03"
@@ -136,8 +135,7 @@ class Date
136
135
  # - Date._jisx0301(string, limit: 128) -> hash
137
136
  # -->
138
137
  # Returns a hash of values parsed from `string`, which should be a valid [JIS X
139
- # 0301 date
140
- # format](rdoc-ref:language/strftime_formatting.rdoc@JIS+X+0301+Format):
138
+ # 0301 date format](rdoc-ref:strftime_formatting.rdoc@JIS+X+0301+Format):
141
139
  #
142
140
  # d = Date.new(2001, 2, 3)
143
141
  # s = d.jisx0301 # => "H13.02.03"
@@ -155,8 +153,7 @@ class Date
155
153
  # -->
156
154
  # **Note**: This method recognizes many forms in `string`, but it is not a
157
155
  # validator. For formats, see ["Specialized Format Strings" in Formats for Dates
158
- # and
159
- # Times](rdoc-ref:language/strftime_formatting.rdoc@Specialized+Format+Strings)
156
+ # and Times](rdoc-ref:strftime_formatting.rdoc@Specialized+Format+Strings)
160
157
  #
161
158
  # If `string` does not specify a valid date, the result is unpredictable;
162
159
  # consider using Date._strptime instead.
@@ -182,7 +179,7 @@ class Date
182
179
  # - Date._rfc2822(string, limit: 128) -> hash
183
180
  # -->
184
181
  # Returns a hash of values parsed from `string`, which should be a valid [RFC
185
- # 2822 date format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
182
+ # 2822 date format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
186
183
  #
187
184
  # d = Date.new(2001, 2, 3)
188
185
  # s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
@@ -200,7 +197,7 @@ class Date
200
197
  # - Date._rfc3339(string, limit: 128) -> hash
201
198
  # -->
202
199
  # Returns a hash of values parsed from `string`, which should be a valid [RFC
203
- # 3339 format](rdoc-ref:language/strftime_formatting.rdoc@RFC+3339+Format):
200
+ # 3339 format](rdoc-ref:strftime_formatting.rdoc@RFC+3339+Format):
204
201
  #
205
202
  # d = Date.new(2001, 2, 3)
206
203
  # s = d.rfc3339 # => "2001-02-03T00:00:00+00:00"
@@ -218,7 +215,7 @@ class Date
218
215
  # - Date._rfc2822(string, limit: 128) -> hash
219
216
  # -->
220
217
  # Returns a hash of values parsed from `string`, which should be a valid [RFC
221
- # 2822 date format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
218
+ # 2822 date format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
222
219
  #
223
220
  # d = Date.new(2001, 2, 3)
224
221
  # s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
@@ -240,8 +237,8 @@ class Date
240
237
  # Date._strptime('2001-02-03', '%Y-%m-%d') # => {:year=>2001, :mon=>2, :mday=>3}
241
238
  #
242
239
  # For other formats, see [Formats for Dates and
243
- # Times](rdoc-ref:language/strftime_formatting.rdoc). (Unlike Date.strftime,
244
- # does not support flags and width.)
240
+ # Times](rdoc-ref:strftime_formatting.rdoc). (Unlike Date.strftime, does not
241
+ # support flags and width.)
245
242
  #
246
243
  # See also [strptime(3)](https://man7.org/linux/man-pages/man3/strptime.3.html).
247
244
  #
@@ -312,7 +309,7 @@ class Date
312
309
  # Date.commercial(2020, 1, 1).to_s # => "2019-12-30"
313
310
  # Date.commercial(2020, 1, 7).to_s # => "2020-01-05"
314
311
  #
315
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
312
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
316
313
  #
317
314
  # Related: Date.jd, Date.new, Date.ordinal.
318
315
  #
@@ -338,8 +335,7 @@ class Date
338
335
  # - Date.httpdate(string = 'Mon, 01 Jan -4712 00:00:00 GMT', start = Date::ITALY, limit: 128) -> date
339
336
  # -->
340
337
  # Returns a new Date object with values parsed from `string`, which should be a
341
- # valid [HTTP date
342
- # format](rdoc-ref:language/strftime_formatting.rdoc@HTTP+Format):
338
+ # valid [HTTP date format](rdoc-ref:strftime_formatting.rdoc@HTTP+Format):
343
339
  #
344
340
  # d = Date.new(2001, 2, 3)
345
341
  # s = d.httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
@@ -347,7 +343,7 @@ class Date
347
343
  #
348
344
  # See:
349
345
  #
350
- # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
346
+ # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
351
347
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
352
348
  #
353
349
  # Related: Date._httpdate (returns a hash).
@@ -360,8 +356,7 @@ class Date
360
356
  # -->
361
357
  # Returns a new Date object with values parsed from `string`, which should
362
358
  # contain an [ISO 8601 formatted
363
- # date](rdoc-ref:language/strftime_formatting.rdoc@ISO+8601+Format+Specification
364
- # s):
359
+ # date](rdoc-ref:strftime_formatting.rdoc@ISO+8601+Format+Specifications):
365
360
  #
366
361
  # d = Date.new(2001, 2, 3)
367
362
  # s = d.iso8601 # => "2001-02-03"
@@ -369,7 +364,7 @@ class Date
369
364
  #
370
365
  # See:
371
366
  #
372
- # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
367
+ # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
373
368
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
374
369
  #
375
370
  # Related: Date._iso8601 (returns a hash).
@@ -398,7 +393,7 @@ class Date
398
393
  #
399
394
  # Date.jd(Date::ITALY - 1).julian? # => true
400
395
  #
401
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
396
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
402
397
  #
403
398
  # Related: Date.new.
404
399
  #
@@ -410,7 +405,7 @@ class Date
410
405
  # -->
411
406
  # Returns a new Date object with values parsed from `string`, which should be a
412
407
  # valid [JIS X 0301
413
- # format](rdoc-ref:language/strftime_formatting.rdoc@JIS+X+0301+Format):
408
+ # format](rdoc-ref:strftime_formatting.rdoc@JIS+X+0301+Format):
414
409
  #
415
410
  # d = Date.new(2001, 2, 3)
416
411
  # s = d.jisx0301 # => "H13.02.03"
@@ -422,7 +417,7 @@ class Date
422
417
  #
423
418
  # See:
424
419
  #
425
- # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
420
+ # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
426
421
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
427
422
  #
428
423
  # Related: Date._jisx0301 (returns a hash).
@@ -485,7 +480,7 @@ class Date
485
480
  #
486
481
  # Raises an exception if `yday` is zero or out of range.
487
482
  #
488
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
483
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
489
484
  #
490
485
  # Related: Date.jd, Date.new.
491
486
  #
@@ -497,10 +492,9 @@ class Date
497
492
  # -->
498
493
  # **Note**: This method recognizes many forms in `string`, but it is not a
499
494
  # validator. For formats, see ["Specialized Format Strings" in Formats for Dates
500
- # and
501
- # Times](rdoc-ref:language/strftime_formatting.rdoc@Specialized+Format+Strings)
502
- # If `string` does not specify a valid date, the result is unpredictable;
503
- # consider using Date._strptime instead.
495
+ # and Times](rdoc-ref:strftime_formatting.rdoc@Specialized+Format+Strings) If
496
+ # `string` does not specify a valid date, the result is unpredictable; consider
497
+ # using Date._strptime instead.
504
498
  #
505
499
  # Returns a new Date object with values parsed from `string`:
506
500
  #
@@ -516,7 +510,7 @@ class Date
516
510
  #
517
511
  # See:
518
512
  #
519
- # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
513
+ # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
520
514
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
521
515
  #
522
516
  # Related: Date._parse (returns a hash).
@@ -529,7 +523,7 @@ class Date
529
523
  # -->
530
524
  # Returns a new Date object with values parsed from `string`, which should be a
531
525
  # valid [RFC 2822 date
532
- # format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
526
+ # format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
533
527
  #
534
528
  # d = Date.new(2001, 2, 3)
535
529
  # s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
@@ -537,7 +531,7 @@ class Date
537
531
  #
538
532
  # See:
539
533
  #
540
- # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
534
+ # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
541
535
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
542
536
  #
543
537
  # Related: Date._rfc2822 (returns a hash).
@@ -549,8 +543,7 @@ class Date
549
543
  # - Date.rfc3339(string = '-4712-01-01T00:00:00+00:00', start = Date::ITALY, limit: 128) -> date
550
544
  # -->
551
545
  # Returns a new Date object with values parsed from `string`, which should be a
552
- # valid [RFC 3339
553
- # format](rdoc-ref:language/strftime_formatting.rdoc@RFC+3339+Format):
546
+ # valid [RFC 3339 format](rdoc-ref:strftime_formatting.rdoc@RFC+3339+Format):
554
547
  #
555
548
  # d = Date.new(2001, 2, 3)
556
549
  # s = d.rfc3339 # => "2001-02-03T00:00:00+00:00"
@@ -558,7 +551,7 @@ class Date
558
551
  #
559
552
  # See:
560
553
  #
561
- # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
554
+ # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
562
555
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
563
556
  #
564
557
  # Related: Date._rfc3339 (returns a hash).
@@ -571,7 +564,7 @@ class Date
571
564
  # -->
572
565
  # Returns a new Date object with values parsed from `string`, which should be a
573
566
  # valid [RFC 2822 date
574
- # format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
567
+ # format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
575
568
  #
576
569
  # d = Date.new(2001, 2, 3)
577
570
  # s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
@@ -579,7 +572,7 @@ class Date
579
572
  #
580
573
  # See:
581
574
  #
582
- # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
575
+ # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
583
576
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
584
577
  #
585
578
  # Related: Date._rfc2822 (returns a hash).
@@ -602,10 +595,10 @@ class Date
602
595
  # Date.strptime('sat3feb01', '%a%d%b%y') # => #<Date: 2001-02-03>
603
596
  #
604
597
  # For other formats, see [Formats for Dates and
605
- # Times](rdoc-ref:language/strftime_formatting.rdoc). (Unlike Date.strftime,
606
- # does not support flags and width.)
598
+ # Times](rdoc-ref:strftime_formatting.rdoc). (Unlike Date.strftime, does not
599
+ # support flags and width.)
607
600
  #
608
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
601
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
609
602
  #
610
603
  # See also [strptime(3)](https://man7.org/linux/man-pages/man3/strptime.3.html).
611
604
  #
@@ -621,7 +614,7 @@ class Date
621
614
  #
622
615
  # Date.today.to_s # => "2022-07-06"
623
616
  #
624
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
617
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
625
618
  #
626
619
  def self.today: (?Integer start) -> Date
627
620
 
@@ -636,7 +629,7 @@ class Date
636
629
  # Date.valid_date?(2001, 2, 29) # => false
637
630
  # Date.valid_date?(2001, 2, -1) # => true
638
631
  #
639
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
632
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
640
633
  #
641
634
  # Related: Date.jd, Date.new.
642
635
  #
@@ -654,7 +647,7 @@ class Date
654
647
  #
655
648
  # See Date.commercial.
656
649
  #
657
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
650
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
658
651
  #
659
652
  # Related: Date.jd, Date.commercial.
660
653
  #
@@ -671,7 +664,7 @@ class Date
671
664
  # Date.valid_date?(2001, 2, 29) # => false
672
665
  # Date.valid_date?(2001, 2, -1) # => true
673
666
  #
674
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
667
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
675
668
  #
676
669
  # Related: Date.jd, Date.new.
677
670
  #
@@ -686,7 +679,7 @@ class Date
686
679
  #
687
680
  # Date.valid_jd?(2451944) # => true
688
681
  #
689
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
682
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
690
683
  #
691
684
  # Related: Date.jd.
692
685
  #
@@ -702,7 +695,7 @@ class Date
702
695
  # Date.valid_ordinal?(2001, 34) # => true
703
696
  # Date.valid_ordinal?(2001, 366) # => false
704
697
  #
705
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
698
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
706
699
  #
707
700
  # Related: Date.jd, Date.ordinal.
708
701
  #
@@ -721,7 +714,7 @@ class Date
721
714
  #
722
715
  # See:
723
716
  #
724
- # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
717
+ # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
725
718
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
726
719
  #
727
720
  # Related: Date._xmlschema (returns a hash).
@@ -929,8 +922,8 @@ class Date
929
922
  # - asctime -> string
930
923
  # -->
931
924
  # Equivalent to #strftime with argument `'%a %b %e %T %Y'` (or its [shorthand
932
- # form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
933
- # rs) `'%c'`):
925
+ # form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
926
+ # `'%c'`):
934
927
  #
935
928
  # Date.new(2001, 2, 3).asctime # => "Sat Feb 3 00:00:00 2001"
936
929
  #
@@ -940,8 +933,8 @@ class Date
940
933
 
941
934
  # <!-- rdoc-file=ext/date/date_core.c -->
942
935
  # Equivalent to #strftime with argument `'%a %b %e %T %Y'` (or its [shorthand
943
- # form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
944
- # rs) `'%c'`):
936
+ # form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
937
+ # `'%c'`):
945
938
  #
946
939
  # Date.new(2001, 2, 3).asctime # => "Sat Feb 3 00:00:00 2001"
947
940
  #
@@ -1072,7 +1065,7 @@ class Date
1072
1065
  # - httpdate -> string
1073
1066
  # -->
1074
1067
  # Equivalent to #strftime with argument `'%a, %d %b %Y %T GMT'`; see [Formats
1075
- # for Dates and Times](rdoc-ref:language/strftime_formatting.rdoc):
1068
+ # for Dates and Times](rdoc-ref:strftime_formatting.rdoc):
1076
1069
  #
1077
1070
  # Date.new(2001, 2, 3).httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
1078
1071
  #
@@ -1094,8 +1087,8 @@ class Date
1094
1087
  # - iso8601 -> string
1095
1088
  # -->
1096
1089
  # Equivalent to #strftime with argument `'%Y-%m-%d'` (or its [shorthand
1097
- # form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
1098
- # rs) `'%F'`);
1090
+ # form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
1091
+ # `'%F'`);
1099
1092
  #
1100
1093
  # Date.new(2001, 2, 3).iso8601 # => "2001-02-03"
1101
1094
  #
@@ -1232,7 +1225,7 @@ class Date
1232
1225
  # d1 = d0.new_start(Date::JULIAN)
1233
1226
  # d1.julian? # => true
1234
1227
  #
1235
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
1228
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
1236
1229
  #
1237
1230
  def new_start: (?Integer start) -> Date
1238
1231
 
@@ -1301,7 +1294,7 @@ class Date
1301
1294
  # - rfc2822 -> string
1302
1295
  # -->
1303
1296
  # Equivalent to #strftime with argument `'%a, %-d %b %Y %T %z'`; see [Formats
1304
- # for Dates and Times](rdoc-ref:language/strftime_formatting.rdoc):
1297
+ # for Dates and Times](rdoc-ref:strftime_formatting.rdoc):
1305
1298
  #
1306
1299
  # Date.new(2001, 2, 3).rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
1307
1300
  #
@@ -1312,7 +1305,7 @@ class Date
1312
1305
  # - rfc3339 -> string
1313
1306
  # -->
1314
1307
  # Equivalent to #strftime with argument `'%FT%T%:z'`; see [Formats for Dates and
1315
- # Times](rdoc-ref:language/strftime_formatting.rdoc):
1308
+ # Times](rdoc-ref:strftime_formatting.rdoc):
1316
1309
  #
1317
1310
  # Date.new(2001, 2, 3).rfc3339 # => "2001-02-03T00:00:00+00:00"
1318
1311
  #
@@ -1321,7 +1314,7 @@ class Date
1321
1314
  # <!-- rdoc-file=ext/date/date_core.c -->
1322
1315
  # Returns a new Date object with values parsed from `string`, which should be a
1323
1316
  # valid [RFC 2822 date
1324
- # format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
1317
+ # format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
1325
1318
  #
1326
1319
  # d = Date.new(2001, 2, 3)
1327
1320
  # s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
@@ -1329,7 +1322,7 @@ class Date
1329
1322
  #
1330
1323
  # See:
1331
1324
  #
1332
- # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
1325
+ # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
1333
1326
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
1334
1327
  #
1335
1328
  # Related: Date._rfc2822 (returns a hash).
@@ -1362,7 +1355,7 @@ class Date
1362
1355
  # Date.new(2001, 2, 3, Date::GREGORIAN).start # => -Infinity
1363
1356
  # Date.new(2001, 2, 3, Date::JULIAN).start # => Infinity
1364
1357
  #
1365
- # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
1358
+ # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
1366
1359
  #
1367
1360
  def start: () -> Float
1368
1361
 
@@ -1408,7 +1401,7 @@ class Date
1408
1401
  # Date.new(2001, 2, 3).strftime # => "2001-02-03"
1409
1402
  #
1410
1403
  # For other formats, see [Formats for Dates and
1411
- # Times](rdoc-ref:language/strftime_formatting.rdoc).
1404
+ # Times](rdoc-ref:strftime_formatting.rdoc).
1412
1405
  #
1413
1406
  def strftime: (?String format) -> String
1414
1407
 
@@ -1460,9 +1453,8 @@ class Date
1460
1453
  # - to_s -> string
1461
1454
  # -->
1462
1455
  # Returns a string representation of the date in `self` in [ISO 8601 extended
1463
- # date
1464
- # format](rdoc-ref:language/strftime_formatting.rdoc@ISO+8601+Format+Specificati
1465
- # ons) (`'%Y-%m-%d'`):
1456
+ # date format](rdoc-ref:strftime_formatting.rdoc@ISO+8601+Format+Specifications)
1457
+ # (`'%Y-%m-%d'`):
1466
1458
  #
1467
1459
  # Date.new(2001, 2, 3).to_s # => "2001-02-03"
1468
1460
  #
@@ -1517,8 +1509,8 @@ class Date
1517
1509
 
1518
1510
  # <!-- rdoc-file=ext/date/date_core.c -->
1519
1511
  # Equivalent to #strftime with argument `'%Y-%m-%d'` (or its [shorthand
1520
- # form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
1521
- # rs) `'%F'`);
1512
+ # form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
1513
+ # `'%F'`);
1522
1514
  #
1523
1515
  # Date.new(2001, 2, 3).iso8601 # => "2001-02-03"
1524
1516
  #
@@ -555,7 +555,7 @@ class DateTime < Date
555
555
  # DateTime.now.strftime # => "2022-07-01T11:03:19-05:00"
556
556
  #
557
557
  # For other formats, see [Formats for Dates and
558
- # Times](rdoc-ref:language/strftime_formatting.rdoc):
558
+ # Times](rdoc-ref:strftime_formatting.rdoc):
559
559
  #
560
560
  def strftime: (?String format) -> String
561
561
 
@@ -44,7 +44,7 @@ class Delegator < BasicObject
44
44
  # rdoc-file=lib/delegate.rb
45
45
  # - !()
46
46
  # -->
47
- # Delegates ! to the `__getobj__`
47
+ # Delegates ! to the _*getobj*_
48
48
  #
49
49
  def !: () -> untyped
50
50
 
@@ -94,7 +94,7 @@ class Delegator < BasicObject
94
94
  # rdoc-file=lib/delegate.rb
95
95
  # - freeze()
96
96
  # -->
97
- # :method: freeze Freeze both the object returned by `__getobj__` and self.
97
+ # :method: freeze Freeze both the object returned by _*getobj*_ and self.
98
98
  #
99
99
  def freeze: () -> self
100
100
 
@@ -102,7 +102,7 @@ class Delegator < BasicObject
102
102
  # rdoc-file=lib/delegate.rb
103
103
  # - marshal_dump()
104
104
  # -->
105
- # Serialization support for the object returned by `__getobj__`.
105
+ # Serialization support for the object returned by _*getobj*_.
106
106
  #
107
107
  def marshal_dump: () -> untyped
108
108
 
@@ -126,7 +126,7 @@ class Delegator < BasicObject
126
126
  # - methods(all=true)
127
127
  # -->
128
128
  # Returns the methods available to this delegate object as the union of this
129
- # object's and `__getobj__` methods.
129
+ # object's and _*getobj*_ methods.
130
130
  #
131
131
  def methods: (?boolish all) -> Array[Symbol]
132
132
 
@@ -135,7 +135,7 @@ class Delegator < BasicObject
135
135
  # - protected_methods(all=true)
136
136
  # -->
137
137
  # Returns the methods available to this delegate object as the union of this
138
- # object's and `__getobj__` protected methods.
138
+ # object's and _*getobj*_ protected methods.
139
139
  #
140
140
  def protected_methods: (?boolish all) -> Array[Symbol]
141
141
 
@@ -144,7 +144,7 @@ class Delegator < BasicObject
144
144
  # - public_methods(all=true)
145
145
  # -->
146
146
  # Returns the methods available to this delegate object as the union of this
147
- # object's and `__getobj__` public methods.
147
+ # object's and _*getobj*_ public methods.
148
148
  #
149
149
  def public_methods: (?untyped all) -> Array[Symbol]
150
150
 
@@ -168,7 +168,7 @@ class Delegator < BasicObject
168
168
  # - respond_to_missing?(m, include_private)
169
169
  # -->
170
170
  # Checks for a method provided by this the delegate object by forwarding the
171
- # call through `__getobj__`.
171
+ # call through _*getobj*_.
172
172
  #
173
173
  def respond_to_missing?: (Symbol m, bool include_private) -> bool
174
174
 
@@ -180,8 +180,5 @@ class Delegator < BasicObject
180
180
  #
181
181
  def target_respond_to?: (untyped target, Symbol m, bool include_private) -> bool
182
182
 
183
- # <!-- rdoc-file=lib/delegate.rb -->
184
- # The version string
185
- #
186
183
  VERSION: String
187
184
  end