rbs 4.0.0.dev.4 → 4.0.0

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 (281) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +14 -14
  3. data/.github/workflows/bundle-update.yml +60 -0
  4. data/.github/workflows/c-check.yml +18 -11
  5. data/.github/workflows/comments.yml +5 -3
  6. data/.github/workflows/dependabot.yml +2 -2
  7. data/.github/workflows/ruby.yml +27 -34
  8. data/.github/workflows/rust.yml +95 -0
  9. data/.github/workflows/typecheck.yml +2 -2
  10. data/.github/workflows/windows.yml +2 -2
  11. data/.rubocop.yml +1 -1
  12. data/CHANGELOG.md +323 -0
  13. data/README.md +1 -1
  14. data/Rakefile +43 -33
  15. data/Steepfile +1 -0
  16. data/config.yml +426 -24
  17. data/core/array.rbs +307 -227
  18. data/core/basic_object.rbs +9 -8
  19. data/core/binding.rbs +0 -2
  20. data/core/builtin.rbs +2 -2
  21. data/core/class.rbs +6 -5
  22. data/core/comparable.rbs +55 -34
  23. data/core/complex.rbs +104 -78
  24. data/core/dir.rbs +61 -49
  25. data/core/encoding.rbs +12 -15
  26. data/core/enumerable.rbs +179 -87
  27. data/core/enumerator/arithmetic_sequence.rbs +70 -0
  28. data/core/enumerator.rbs +65 -2
  29. data/core/errno.rbs +11 -2
  30. data/core/errors.rbs +58 -29
  31. data/core/exception.rbs +13 -13
  32. data/core/fiber.rbs +74 -54
  33. data/core/file.rbs +280 -177
  34. data/core/file_test.rbs +3 -3
  35. data/core/float.rbs +257 -92
  36. data/core/gc.rbs +425 -281
  37. data/core/hash.rbs +1045 -739
  38. data/core/integer.rbs +135 -137
  39. data/core/io/buffer.rbs +53 -42
  40. data/core/io/wait.rbs +13 -35
  41. data/core/io.rbs +192 -144
  42. data/core/kernel.rbs +216 -155
  43. data/core/marshal.rbs +4 -4
  44. data/core/match_data.rbs +15 -13
  45. data/core/math.rbs +107 -66
  46. data/core/method.rbs +69 -33
  47. data/core/module.rbs +244 -106
  48. data/core/nil_class.rbs +7 -6
  49. data/core/numeric.rbs +74 -63
  50. data/core/object.rbs +9 -11
  51. data/core/object_space.rbs +30 -23
  52. data/core/pathname.rbs +1322 -0
  53. data/core/proc.rbs +95 -58
  54. data/core/process.rbs +222 -202
  55. data/core/ractor.rbs +371 -515
  56. data/core/random.rbs +21 -3
  57. data/core/range.rbs +159 -57
  58. data/core/rational.rbs +60 -89
  59. data/core/rbs/unnamed/argf.rbs +60 -53
  60. data/core/rbs/unnamed/env_class.rbs +19 -14
  61. data/core/rbs/unnamed/main_class.rbs +123 -0
  62. data/core/rbs/unnamed/random.rbs +11 -118
  63. data/core/regexp.rbs +258 -214
  64. data/core/ruby.rbs +53 -0
  65. data/core/ruby_vm.rbs +38 -34
  66. data/core/rubygems/config_file.rbs +5 -5
  67. data/core/rubygems/errors.rbs +4 -71
  68. data/core/rubygems/requirement.rbs +5 -5
  69. data/core/rubygems/rubygems.rbs +16 -82
  70. data/core/rubygems/version.rbs +2 -3
  71. data/core/set.rbs +490 -360
  72. data/core/signal.rbs +26 -16
  73. data/core/string.rbs +3234 -1285
  74. data/core/struct.rbs +27 -26
  75. data/core/symbol.rbs +41 -34
  76. data/core/thread.rbs +135 -67
  77. data/core/time.rbs +81 -50
  78. data/core/trace_point.rbs +41 -35
  79. data/core/true_class.rbs +2 -2
  80. data/core/unbound_method.rbs +24 -16
  81. data/core/warning.rbs +7 -7
  82. data/docs/aliases.md +79 -0
  83. data/docs/collection.md +3 -3
  84. data/docs/config.md +171 -0
  85. data/docs/encoding.md +56 -0
  86. data/docs/gem.md +0 -1
  87. data/docs/inline.md +576 -0
  88. data/docs/sigs.md +3 -3
  89. data/docs/syntax.md +46 -16
  90. data/docs/type_fingerprint.md +21 -0
  91. data/exe/rbs +1 -1
  92. data/ext/rbs_extension/ast_translation.c +544 -116
  93. data/ext/rbs_extension/ast_translation.h +3 -0
  94. data/ext/rbs_extension/class_constants.c +16 -2
  95. data/ext/rbs_extension/class_constants.h +8 -0
  96. data/ext/rbs_extension/extconf.rb +5 -1
  97. data/ext/rbs_extension/legacy_location.c +33 -56
  98. data/ext/rbs_extension/legacy_location.h +37 -0
  99. data/ext/rbs_extension/main.c +44 -35
  100. data/include/rbs/ast.h +448 -173
  101. data/include/rbs/defines.h +27 -0
  102. data/include/rbs/lexer.h +30 -11
  103. data/include/rbs/location.h +25 -44
  104. data/include/rbs/parser.h +6 -6
  105. data/include/rbs/string.h +0 -2
  106. data/include/rbs/util/rbs_allocator.h +34 -13
  107. data/include/rbs/util/rbs_assert.h +12 -1
  108. data/include/rbs/util/rbs_constant_pool.h +0 -3
  109. data/include/rbs/util/rbs_encoding.h +2 -0
  110. data/include/rbs/util/rbs_unescape.h +2 -1
  111. data/include/rbs.h +8 -0
  112. data/lib/rbs/ast/annotation.rb +1 -1
  113. data/lib/rbs/ast/comment.rb +1 -1
  114. data/lib/rbs/ast/declarations.rb +10 -10
  115. data/lib/rbs/ast/members.rb +14 -14
  116. data/lib/rbs/ast/ruby/annotations.rb +293 -3
  117. data/lib/rbs/ast/ruby/comment_block.rb +24 -0
  118. data/lib/rbs/ast/ruby/declarations.rb +198 -3
  119. data/lib/rbs/ast/ruby/helpers/constant_helper.rb +4 -0
  120. data/lib/rbs/ast/ruby/members.rb +532 -22
  121. data/lib/rbs/ast/type_param.rb +24 -4
  122. data/lib/rbs/buffer.rb +20 -15
  123. data/lib/rbs/cli/diff.rb +16 -15
  124. data/lib/rbs/cli/validate.rb +38 -106
  125. data/lib/rbs/cli.rb +52 -19
  126. data/lib/rbs/collection/config/lockfile_generator.rb +14 -2
  127. data/lib/rbs/collection/sources/git.rb +1 -0
  128. data/lib/rbs/definition.rb +1 -1
  129. data/lib/rbs/definition_builder/ancestor_builder.rb +62 -9
  130. data/lib/rbs/definition_builder/method_builder.rb +20 -0
  131. data/lib/rbs/definition_builder.rb +147 -25
  132. data/lib/rbs/diff.rb +7 -1
  133. data/lib/rbs/environment.rb +227 -74
  134. data/lib/rbs/environment_loader.rb +0 -6
  135. data/lib/rbs/errors.rb +27 -18
  136. data/lib/rbs/inline_parser.rb +342 -6
  137. data/lib/rbs/location_aux.rb +1 -1
  138. data/lib/rbs/locator.rb +5 -1
  139. data/lib/rbs/method_type.rb +5 -3
  140. data/lib/rbs/parser_aux.rb +20 -7
  141. data/lib/rbs/prototype/helpers.rb +57 -0
  142. data/lib/rbs/prototype/rb.rb +3 -28
  143. data/lib/rbs/prototype/rbi.rb +3 -20
  144. data/lib/rbs/prototype/runtime.rb +8 -0
  145. data/lib/rbs/resolver/constant_resolver.rb +2 -2
  146. data/lib/rbs/resolver/type_name_resolver.rb +116 -38
  147. data/lib/rbs/subtractor.rb +3 -1
  148. data/lib/rbs/test/type_check.rb +19 -2
  149. data/lib/rbs/type_name.rb +1 -1
  150. data/lib/rbs/types.rb +88 -78
  151. data/lib/rbs/unit_test/type_assertions.rb +35 -8
  152. data/lib/rbs/validator.rb +2 -2
  153. data/lib/rbs/version.rb +1 -1
  154. data/lib/rbs.rb +1 -2
  155. data/lib/rdoc/discover.rb +1 -1
  156. data/lib/rdoc_plugin/parser.rb +1 -1
  157. data/rbs.gemspec +4 -3
  158. data/rust/.gitignore +1 -0
  159. data/rust/Cargo.lock +378 -0
  160. data/rust/Cargo.toml +7 -0
  161. data/rust/ruby-rbs/Cargo.toml +22 -0
  162. data/rust/ruby-rbs/build.rs +764 -0
  163. data/rust/ruby-rbs/examples/locations.rs +60 -0
  164. data/rust/ruby-rbs/src/lib.rs +1 -0
  165. data/rust/ruby-rbs/src/node/mod.rs +742 -0
  166. data/rust/ruby-rbs/tests/sanity.rs +47 -0
  167. data/rust/ruby-rbs/vendor/rbs/config.yml +1 -0
  168. data/rust/ruby-rbs-sys/Cargo.toml +23 -0
  169. data/rust/ruby-rbs-sys/build.rs +204 -0
  170. data/rust/ruby-rbs-sys/src/lib.rs +50 -0
  171. data/rust/ruby-rbs-sys/vendor/rbs/include +1 -0
  172. data/rust/ruby-rbs-sys/vendor/rbs/src +1 -0
  173. data/rust/ruby-rbs-sys/wrapper.h +1 -0
  174. data/schema/typeParam.json +17 -1
  175. data/sig/ast/ruby/annotations.rbs +315 -4
  176. data/sig/ast/ruby/comment_block.rbs +8 -0
  177. data/sig/ast/ruby/declarations.rbs +102 -4
  178. data/sig/ast/ruby/members.rbs +108 -2
  179. data/sig/cli/diff.rbs +5 -11
  180. data/sig/cli/validate.rbs +12 -8
  181. data/sig/cli.rbs +18 -18
  182. data/sig/definition.rbs +6 -1
  183. data/sig/definition_builder.rbs +2 -0
  184. data/sig/environment.rbs +70 -12
  185. data/sig/errors.rbs +13 -14
  186. data/sig/inline_parser.rbs +39 -2
  187. data/sig/locator.rbs +0 -2
  188. data/sig/manifest.yaml +0 -1
  189. data/sig/method_builder.rbs +3 -1
  190. data/sig/parser.rbs +31 -13
  191. data/sig/prototype/helpers.rbs +2 -0
  192. data/sig/resolver/type_name_resolver.rbs +35 -7
  193. data/sig/source.rbs +3 -3
  194. data/sig/type_param.rbs +13 -8
  195. data/sig/types.rbs +6 -7
  196. data/sig/unit_test/spy.rbs +0 -8
  197. data/sig/unit_test/type_assertions.rbs +11 -0
  198. data/src/ast.c +410 -153
  199. data/src/lexer.c +1392 -1313
  200. data/src/lexer.re +3 -0
  201. data/src/lexstate.c +58 -37
  202. data/src/location.c +8 -48
  203. data/src/parser.c +977 -516
  204. data/src/string.c +0 -48
  205. data/src/util/rbs_allocator.c +89 -71
  206. data/src/util/rbs_assert.c +1 -1
  207. data/src/util/rbs_buffer.c +2 -2
  208. data/src/util/rbs_constant_pool.c +10 -14
  209. data/src/util/rbs_encoding.c +4 -8
  210. data/src/util/rbs_unescape.c +56 -20
  211. data/stdlib/bigdecimal/0/big_decimal.rbs +116 -98
  212. data/stdlib/bigdecimal-math/0/big_math.rbs +169 -8
  213. data/stdlib/cgi/0/core.rbs +9 -393
  214. data/stdlib/cgi/0/manifest.yaml +1 -0
  215. data/stdlib/cgi-escape/0/escape.rbs +171 -0
  216. data/stdlib/coverage/0/coverage.rbs +7 -4
  217. data/stdlib/date/0/date.rbs +92 -79
  218. data/stdlib/date/0/date_time.rbs +25 -24
  219. data/stdlib/delegate/0/delegator.rbs +10 -7
  220. data/stdlib/did_you_mean/0/did_you_mean.rbs +17 -16
  221. data/stdlib/digest/0/digest.rbs +110 -0
  222. data/stdlib/erb/0/erb.rbs +748 -347
  223. data/stdlib/etc/0/etc.rbs +55 -50
  224. data/stdlib/fileutils/0/fileutils.rbs +158 -139
  225. data/stdlib/forwardable/0/forwardable.rbs +13 -10
  226. data/stdlib/io-console/0/io-console.rbs +2 -2
  227. data/stdlib/json/0/json.rbs +217 -136
  228. data/stdlib/monitor/0/monitor.rbs +3 -3
  229. data/stdlib/net-http/0/net-http.rbs +162 -134
  230. data/stdlib/objspace/0/objspace.rbs +17 -34
  231. data/stdlib/open-uri/0/open-uri.rbs +48 -8
  232. data/stdlib/open3/0/open3.rbs +469 -10
  233. data/stdlib/openssl/0/openssl.rbs +475 -357
  234. data/stdlib/optparse/0/optparse.rbs +26 -17
  235. data/stdlib/pathname/0/pathname.rbs +11 -1381
  236. data/stdlib/pp/0/pp.rbs +9 -8
  237. data/stdlib/prettyprint/0/prettyprint.rbs +7 -7
  238. data/stdlib/pstore/0/pstore.rbs +35 -30
  239. data/stdlib/psych/0/psych.rbs +65 -12
  240. data/stdlib/psych/0/store.rbs +2 -4
  241. data/stdlib/pty/0/pty.rbs +9 -6
  242. data/stdlib/random-formatter/0/random-formatter.rbs +277 -0
  243. data/stdlib/rdoc/0/code_object.rbs +2 -1
  244. data/stdlib/rdoc/0/parser.rbs +1 -1
  245. data/stdlib/rdoc/0/rdoc.rbs +1 -1
  246. data/stdlib/rdoc/0/store.rbs +1 -1
  247. data/stdlib/resolv/0/resolv.rbs +25 -68
  248. data/stdlib/ripper/0/ripper.rbs +22 -19
  249. data/stdlib/securerandom/0/manifest.yaml +2 -0
  250. data/stdlib/securerandom/0/securerandom.rbs +7 -20
  251. data/stdlib/shellwords/0/shellwords.rbs +2 -2
  252. data/stdlib/singleton/0/singleton.rbs +3 -0
  253. data/stdlib/socket/0/addrinfo.rbs +7 -7
  254. data/stdlib/socket/0/basic_socket.rbs +3 -3
  255. data/stdlib/socket/0/ip_socket.rbs +10 -8
  256. data/stdlib/socket/0/socket.rbs +23 -10
  257. data/stdlib/socket/0/tcp_server.rbs +1 -1
  258. data/stdlib/socket/0/tcp_socket.rbs +11 -3
  259. data/stdlib/socket/0/udp_socket.rbs +1 -1
  260. data/stdlib/socket/0/unix_server.rbs +1 -1
  261. data/stdlib/stringio/0/stringio.rbs +1177 -85
  262. data/stdlib/strscan/0/string_scanner.rbs +27 -25
  263. data/stdlib/tempfile/0/tempfile.rbs +25 -21
  264. data/stdlib/time/0/time.rbs +8 -6
  265. data/stdlib/timeout/0/timeout.rbs +63 -7
  266. data/stdlib/tsort/0/cyclic.rbs +3 -0
  267. data/stdlib/tsort/0/tsort.rbs +7 -6
  268. data/stdlib/uri/0/common.rbs +42 -20
  269. data/stdlib/uri/0/file.rbs +3 -3
  270. data/stdlib/uri/0/generic.rbs +26 -18
  271. data/stdlib/uri/0/http.rbs +2 -2
  272. data/stdlib/uri/0/ldap.rbs +2 -2
  273. data/stdlib/uri/0/mailto.rbs +3 -3
  274. data/stdlib/uri/0/rfc2396_parser.rbs +12 -12
  275. data/stdlib/zlib/0/deflate.rbs +4 -3
  276. data/stdlib/zlib/0/gzip_reader.rbs +6 -6
  277. data/stdlib/zlib/0/gzip_writer.rbs +14 -12
  278. data/stdlib/zlib/0/inflate.rbs +1 -1
  279. data/stdlib/zlib/0/need_dict.rbs +1 -1
  280. data/stdlib/zlib/0/zstream.rbs +1 -0
  281. metadata +50 -6
@@ -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:date/calendars.rdoc).
8
+ # Gregorian Calendars](rdoc-ref:language/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:strftime_formatting.rdoc@Specialized+Format+Strings)
56
+ # Times](rdoc-ref:language/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:date/calendars.rdoc@Argument+start).
91
+ # See argument [start](rdoc-ref:language/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:strftime_formatting.rdoc@HTTP+Format):
104
+ # date format](rdoc-ref:language/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,7 +118,8 @@ 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:strftime_formatting.rdoc@ISO+8601+Format+Specifications):
121
+ # date](rdoc-ref:language/strftime_formatting.rdoc@ISO+8601+Format+Specification
122
+ # s):
122
123
  #
123
124
  # d = Date.new(2001, 2, 3)
124
125
  # s = d.iso8601 # => "2001-02-03"
@@ -135,7 +136,8 @@ class Date
135
136
  # - Date._jisx0301(string, limit: 128) -> hash
136
137
  # -->
137
138
  # Returns a hash of values parsed from `string`, which should be a valid [JIS X
138
- # 0301 date format](rdoc-ref:strftime_formatting.rdoc@JIS+X+0301+Format):
139
+ # 0301 date
140
+ # format](rdoc-ref:language/strftime_formatting.rdoc@JIS+X+0301+Format):
139
141
  #
140
142
  # d = Date.new(2001, 2, 3)
141
143
  # s = d.jisx0301 # => "H13.02.03"
@@ -153,7 +155,8 @@ class Date
153
155
  # -->
154
156
  # **Note**: This method recognizes many forms in `string`, but it is not a
155
157
  # validator. For formats, see ["Specialized Format Strings" in Formats for Dates
156
- # and Times](rdoc-ref:strftime_formatting.rdoc@Specialized+Format+Strings)
158
+ # and
159
+ # Times](rdoc-ref:language/strftime_formatting.rdoc@Specialized+Format+Strings)
157
160
  #
158
161
  # If `string` does not specify a valid date, the result is unpredictable;
159
162
  # consider using Date._strptime instead.
@@ -162,8 +165,8 @@ class Date
162
165
  #
163
166
  # Date._parse('2001-02-03') # => {:year=>2001, :mon=>2, :mday=>3}
164
167
  #
165
- # If `comp` is `true` and the given year is in the range `(0..99)`, the current
166
- # century is supplied; otherwise, the year is taken as given:
168
+ # If `comp` is `true` and the given year is in the range <code>(0..99)</code>,
169
+ # the current century is supplied; otherwise, the year is taken as given:
167
170
  #
168
171
  # Date._parse('01-02-03', true) # => {:year=>2001, :mon=>2, :mday=>3}
169
172
  # Date._parse('01-02-03', false) # => {:year=>1, :mon=>2, :mday=>3}
@@ -179,7 +182,7 @@ class Date
179
182
  # - Date._rfc2822(string, limit: 128) -> hash
180
183
  # -->
181
184
  # Returns a hash of values parsed from `string`, which should be a valid [RFC
182
- # 2822 date format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
185
+ # 2822 date format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
183
186
  #
184
187
  # d = Date.new(2001, 2, 3)
185
188
  # s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
@@ -197,7 +200,7 @@ class Date
197
200
  # - Date._rfc3339(string, limit: 128) -> hash
198
201
  # -->
199
202
  # Returns a hash of values parsed from `string`, which should be a valid [RFC
200
- # 3339 format](rdoc-ref:strftime_formatting.rdoc@RFC+3339+Format):
203
+ # 3339 format](rdoc-ref:language/strftime_formatting.rdoc@RFC+3339+Format):
201
204
  #
202
205
  # d = Date.new(2001, 2, 3)
203
206
  # s = d.rfc3339 # => "2001-02-03T00:00:00+00:00"
@@ -215,7 +218,7 @@ class Date
215
218
  # - Date._rfc2822(string, limit: 128) -> hash
216
219
  # -->
217
220
  # Returns a hash of values parsed from `string`, which should be a valid [RFC
218
- # 2822 date format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
221
+ # 2822 date format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
219
222
  #
220
223
  # d = Date.new(2001, 2, 3)
221
224
  # s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
@@ -237,8 +240,8 @@ class Date
237
240
  # Date._strptime('2001-02-03', '%Y-%m-%d') # => {:year=>2001, :mon=>2, :mday=>3}
238
241
  #
239
242
  # For other formats, see [Formats for Dates and
240
- # Times](rdoc-ref:strftime_formatting.rdoc). (Unlike Date.strftime, does not
241
- # support flags and width.)
243
+ # Times](rdoc-ref:language/strftime_formatting.rdoc). (Unlike Date.strftime,
244
+ # does not support flags and width.)
242
245
  #
243
246
  # See also [strptime(3)](https://man7.org/linux/man-pages/man3/strptime.3.html).
244
247
  #
@@ -309,7 +312,7 @@ class Date
309
312
  # Date.commercial(2020, 1, 1).to_s # => "2019-12-30"
310
313
  # Date.commercial(2020, 1, 7).to_s # => "2020-01-05"
311
314
  #
312
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
315
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
313
316
  #
314
317
  # Related: Date.jd, Date.new, Date.ordinal.
315
318
  #
@@ -335,7 +338,8 @@ class Date
335
338
  # - Date.httpdate(string = 'Mon, 01 Jan -4712 00:00:00 GMT', start = Date::ITALY, limit: 128) -> date
336
339
  # -->
337
340
  # Returns a new Date object with values parsed from `string`, which should be a
338
- # valid [HTTP date format](rdoc-ref:strftime_formatting.rdoc@HTTP+Format):
341
+ # valid [HTTP date
342
+ # format](rdoc-ref:language/strftime_formatting.rdoc@HTTP+Format):
339
343
  #
340
344
  # d = Date.new(2001, 2, 3)
341
345
  # s = d.httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
@@ -343,7 +347,7 @@ class Date
343
347
  #
344
348
  # See:
345
349
  #
346
- # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
350
+ # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
347
351
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
348
352
  #
349
353
  # Related: Date._httpdate (returns a hash).
@@ -356,7 +360,8 @@ class Date
356
360
  # -->
357
361
  # Returns a new Date object with values parsed from `string`, which should
358
362
  # contain an [ISO 8601 formatted
359
- # date](rdoc-ref:strftime_formatting.rdoc@ISO+8601+Format+Specifications):
363
+ # date](rdoc-ref:language/strftime_formatting.rdoc@ISO+8601+Format+Specification
364
+ # s):
360
365
  #
361
366
  # d = Date.new(2001, 2, 3)
362
367
  # s = d.iso8601 # => "2001-02-03"
@@ -364,7 +369,7 @@ class Date
364
369
  #
365
370
  # See:
366
371
  #
367
- # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
372
+ # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
368
373
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
369
374
  #
370
375
  # Related: Date._iso8601 (returns a hash).
@@ -393,7 +398,7 @@ class Date
393
398
  #
394
399
  # Date.jd(Date::ITALY - 1).julian? # => true
395
400
  #
396
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
401
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
397
402
  #
398
403
  # Related: Date.new.
399
404
  #
@@ -405,7 +410,7 @@ class Date
405
410
  # -->
406
411
  # Returns a new Date object with values parsed from `string`, which should be a
407
412
  # valid [JIS X 0301
408
- # format](rdoc-ref:strftime_formatting.rdoc@JIS+X+0301+Format):
413
+ # format](rdoc-ref:language/strftime_formatting.rdoc@JIS+X+0301+Format):
409
414
  #
410
415
  # d = Date.new(2001, 2, 3)
411
416
  # s = d.jisx0301 # => "H13.02.03"
@@ -417,7 +422,7 @@ class Date
417
422
  #
418
423
  # See:
419
424
  #
420
- # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
425
+ # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
421
426
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
422
427
  #
423
428
  # Related: Date._jisx0301 (returns a hash).
@@ -480,7 +485,7 @@ class Date
480
485
  #
481
486
  # Raises an exception if `yday` is zero or out of range.
482
487
  #
483
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
488
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
484
489
  #
485
490
  # Related: Date.jd, Date.new.
486
491
  #
@@ -492,9 +497,10 @@ class Date
492
497
  # -->
493
498
  # **Note**: This method recognizes many forms in `string`, but it is not a
494
499
  # validator. For formats, see ["Specialized Format Strings" in Formats for Dates
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.
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.
498
504
  #
499
505
  # Returns a new Date object with values parsed from `string`:
500
506
  #
@@ -502,15 +508,15 @@ class Date
502
508
  # Date.parse('20010203') # => #<Date: 2001-02-03>
503
509
  # Date.parse('3rd Feb 2001') # => #<Date: 2001-02-03>
504
510
  #
505
- # If `comp` is `true` and the given year is in the range `(0..99)`, the current
506
- # century is supplied; otherwise, the year is taken as given:
511
+ # If `comp` is `true` and the given year is in the range <code>(0..99)</code>,
512
+ # the current century is supplied; otherwise, the year is taken as given:
507
513
  #
508
514
  # Date.parse('01-02-03', true) # => #<Date: 2001-02-03>
509
515
  # Date.parse('01-02-03', false) # => #<Date: 0001-02-03>
510
516
  #
511
517
  # See:
512
518
  #
513
- # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
519
+ # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
514
520
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
515
521
  #
516
522
  # Related: Date._parse (returns a hash).
@@ -523,7 +529,7 @@ class Date
523
529
  # -->
524
530
  # Returns a new Date object with values parsed from `string`, which should be a
525
531
  # valid [RFC 2822 date
526
- # format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
532
+ # format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
527
533
  #
528
534
  # d = Date.new(2001, 2, 3)
529
535
  # s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
@@ -531,7 +537,7 @@ class Date
531
537
  #
532
538
  # See:
533
539
  #
534
- # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
540
+ # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
535
541
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
536
542
  #
537
543
  # Related: Date._rfc2822 (returns a hash).
@@ -543,7 +549,8 @@ class Date
543
549
  # - Date.rfc3339(string = '-4712-01-01T00:00:00+00:00', start = Date::ITALY, limit: 128) -> date
544
550
  # -->
545
551
  # Returns a new Date object with values parsed from `string`, which should be a
546
- # valid [RFC 3339 format](rdoc-ref:strftime_formatting.rdoc@RFC+3339+Format):
552
+ # valid [RFC 3339
553
+ # format](rdoc-ref:language/strftime_formatting.rdoc@RFC+3339+Format):
547
554
  #
548
555
  # d = Date.new(2001, 2, 3)
549
556
  # s = d.rfc3339 # => "2001-02-03T00:00:00+00:00"
@@ -551,7 +558,7 @@ class Date
551
558
  #
552
559
  # See:
553
560
  #
554
- # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
561
+ # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
555
562
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
556
563
  #
557
564
  # Related: Date._rfc3339 (returns a hash).
@@ -564,7 +571,7 @@ class Date
564
571
  # -->
565
572
  # Returns a new Date object with values parsed from `string`, which should be a
566
573
  # valid [RFC 2822 date
567
- # format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
574
+ # format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
568
575
  #
569
576
  # d = Date.new(2001, 2, 3)
570
577
  # s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
@@ -572,7 +579,7 @@ class Date
572
579
  #
573
580
  # See:
574
581
  #
575
- # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
582
+ # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
576
583
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
577
584
  #
578
585
  # Related: Date._rfc2822 (returns a hash).
@@ -595,10 +602,10 @@ class Date
595
602
  # Date.strptime('sat3feb01', '%a%d%b%y') # => #<Date: 2001-02-03>
596
603
  #
597
604
  # For other formats, see [Formats for Dates and
598
- # Times](rdoc-ref:strftime_formatting.rdoc). (Unlike Date.strftime, does not
599
- # support flags and width.)
605
+ # Times](rdoc-ref:language/strftime_formatting.rdoc). (Unlike Date.strftime,
606
+ # does not support flags and width.)
600
607
  #
601
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
608
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
602
609
  #
603
610
  # See also [strptime(3)](https://man7.org/linux/man-pages/man3/strptime.3.html).
604
611
  #
@@ -614,7 +621,7 @@ class Date
614
621
  #
615
622
  # Date.today.to_s # => "2022-07-06"
616
623
  #
617
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
624
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
618
625
  #
619
626
  def self.today: (?Integer start) -> Date
620
627
 
@@ -629,7 +636,7 @@ class Date
629
636
  # Date.valid_date?(2001, 2, 29) # => false
630
637
  # Date.valid_date?(2001, 2, -1) # => true
631
638
  #
632
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
639
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
633
640
  #
634
641
  # Related: Date.jd, Date.new.
635
642
  #
@@ -647,7 +654,7 @@ class Date
647
654
  #
648
655
  # See Date.commercial.
649
656
  #
650
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
657
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
651
658
  #
652
659
  # Related: Date.jd, Date.commercial.
653
660
  #
@@ -664,7 +671,7 @@ class Date
664
671
  # Date.valid_date?(2001, 2, 29) # => false
665
672
  # Date.valid_date?(2001, 2, -1) # => true
666
673
  #
667
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
674
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
668
675
  #
669
676
  # Related: Date.jd, Date.new.
670
677
  #
@@ -679,7 +686,7 @@ class Date
679
686
  #
680
687
  # Date.valid_jd?(2451944) # => true
681
688
  #
682
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
689
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
683
690
  #
684
691
  # Related: Date.jd.
685
692
  #
@@ -695,7 +702,7 @@ class Date
695
702
  # Date.valid_ordinal?(2001, 34) # => true
696
703
  # Date.valid_ordinal?(2001, 366) # => false
697
704
  #
698
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
705
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
699
706
  #
700
707
  # Related: Date.jd, Date.ordinal.
701
708
  #
@@ -714,7 +721,7 @@ class Date
714
721
  #
715
722
  # See:
716
723
  #
717
- # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
724
+ # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
718
725
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
719
726
  #
720
727
  # Related: Date._xmlschema (returns a hash).
@@ -793,7 +800,7 @@ class Date
793
800
  # -->
794
801
  # Compares `self` and `other`, returning:
795
802
  #
796
- # * `-1` if `other` is larger.
803
+ # * <code>-1</code> if `other` is larger.
797
804
  # * `0` if the two are equal.
798
805
  # * `1` if `other` is smaller.
799
806
  # * `nil` if the two are incomparable.
@@ -815,7 +822,7 @@ class Date
815
822
  # d <=> DateTime.new(2022, 7, 27) # => 0
816
823
  # d <=> DateTime.new(2022, 7, 28) # => -1
817
824
  #
818
- # * A numeric (compares `self.ajd` to `other`):
825
+ # * A numeric (compares <code>self.ajd</code> to `other`):
819
826
  #
820
827
  # d <=> 2459788 # => -1
821
828
  # d <=> 2459787 # => 1
@@ -852,7 +859,7 @@ class Date
852
859
  # d === DateTime.new(2022, 7, 27) # => true
853
860
  # d === DateTime.new(2022, 7, 28) # => false
854
861
  #
855
- # * A numeric (compares `self.jd` to `other`):
862
+ # * A numeric (compares <code>self.jd</code> to `other`):
856
863
  #
857
864
  # d === 2459788 # => true
858
865
  # d === 2459787 # => false
@@ -921,9 +928,10 @@ class Date
921
928
  # rdoc-file=ext/date/date_core.c
922
929
  # - asctime -> string
923
930
  # -->
924
- # Equivalent to #strftime with argument `'%a %b %e %T %Y'` (or its [shorthand
925
- # form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
926
- # `'%c'`):
931
+ # Equivalent to #strftime with argument <code>'%a %b %e %T %Y'</code> (or its
932
+ # [shorthand
933
+ # form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
934
+ # rs) <code>'%c'</code>):
927
935
  #
928
936
  # Date.new(2001, 2, 3).asctime # => "Sat Feb 3 00:00:00 2001"
929
937
  #
@@ -932,9 +940,10 @@ class Date
932
940
  def asctime: () -> String
933
941
 
934
942
  # <!-- rdoc-file=ext/date/date_core.c -->
935
- # Equivalent to #strftime with argument `'%a %b %e %T %Y'` (or its [shorthand
936
- # form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
937
- # `'%c'`):
943
+ # Equivalent to #strftime with argument <code>'%a %b %e %T %Y'</code> (or its
944
+ # [shorthand
945
+ # form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
946
+ # rs) <code>'%c'</code>):
938
947
  #
939
948
  # Date.new(2001, 2, 3).asctime # => "Sat Feb 3 00:00:00 2001"
940
949
  #
@@ -986,7 +995,8 @@ class Date
986
995
  # - deconstruct_keys(array_of_names_or_nil) -> hash
987
996
  # -->
988
997
  # Returns a hash of the name/value pairs, to use in pattern matching. Possible
989
- # keys are: `:year`, `:month`, `:day`, `:wday`, `:yday`.
998
+ # keys are: <code>:year</code>, <code>:month</code>, <code>:day</code>,
999
+ # <code>:wday</code>, <code>:yday</code>.
990
1000
  #
991
1001
  # Possible usages:
992
1002
  #
@@ -1019,7 +1029,7 @@ class Date
1019
1029
  # rdoc-file=ext/date/date_core.c
1020
1030
  # - downto(min){|date| ... } -> self
1021
1031
  # -->
1022
- # Equivalent to #step with arguments `min` and `-1`.
1032
+ # Equivalent to #step with arguments `min` and <code>-1</code>.
1023
1033
  #
1024
1034
  def downto: (Date min) { (Date) -> untyped } -> Date
1025
1035
  | (Date min) -> Enumerator[Date, Date]
@@ -1064,8 +1074,8 @@ class Date
1064
1074
  # rdoc-file=ext/date/date_core.c
1065
1075
  # - httpdate -> string
1066
1076
  # -->
1067
- # Equivalent to #strftime with argument `'%a, %d %b %Y %T GMT'`; see [Formats
1068
- # for Dates and Times](rdoc-ref:strftime_formatting.rdoc):
1077
+ # Equivalent to #strftime with argument <code>'%a, %d %b %Y %T GMT'</code>; see
1078
+ # [Formats for Dates and Times](rdoc-ref:language/strftime_formatting.rdoc):
1069
1079
  #
1070
1080
  # Date.new(2001, 2, 3).httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
1071
1081
  #
@@ -1086,9 +1096,10 @@ class Date
1086
1096
  # rdoc-file=ext/date/date_core.c
1087
1097
  # - iso8601 -> string
1088
1098
  # -->
1089
- # Equivalent to #strftime with argument `'%Y-%m-%d'` (or its [shorthand
1090
- # form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
1091
- # `'%F'`);
1099
+ # Equivalent to #strftime with argument <code>'%Y-%m-%d'</code> (or its
1100
+ # [shorthand
1101
+ # form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
1102
+ # rs) <code>'%F'</code>);
1092
1103
  #
1093
1104
  # Date.new(2001, 2, 3).iso8601 # => "2001-02-03"
1094
1105
  #
@@ -1225,7 +1236,7 @@ class Date
1225
1236
  # d1 = d0.new_start(Date::JULIAN)
1226
1237
  # d1.julian? # => true
1227
1238
  #
1228
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
1239
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
1229
1240
  #
1230
1241
  def new_start: (?Integer start) -> Date
1231
1242
 
@@ -1261,7 +1272,7 @@ class Date
1261
1272
  # rdoc-file=ext/date/date_core.c
1262
1273
  # - next_year(n = 1) -> new_date
1263
1274
  # -->
1264
- # Equivalent to #>> with argument `n * 12`.
1275
+ # Equivalent to #>> with argument <code>n * 12</code>.
1265
1276
  #
1266
1277
  def next_year: (?Integer year) -> Date
1267
1278
 
@@ -1285,7 +1296,7 @@ class Date
1285
1296
  # rdoc-file=ext/date/date_core.c
1286
1297
  # - prev_year(n = 1) -> new_date
1287
1298
  # -->
1288
- # Equivalent to #<< with argument `n * 12`.
1299
+ # Equivalent to #<< with argument <code>n * 12</code>.
1289
1300
  #
1290
1301
  def prev_year: (?Integer year) -> Date
1291
1302
 
@@ -1293,8 +1304,8 @@ class Date
1293
1304
  # rdoc-file=ext/date/date_core.c
1294
1305
  # - rfc2822 -> string
1295
1306
  # -->
1296
- # Equivalent to #strftime with argument `'%a, %-d %b %Y %T %z'`; see [Formats
1297
- # for Dates and Times](rdoc-ref:strftime_formatting.rdoc):
1307
+ # Equivalent to #strftime with argument <code>'%a, %-d %b %Y %T %z'</code>; see
1308
+ # [Formats for Dates and Times](rdoc-ref:language/strftime_formatting.rdoc):
1298
1309
  #
1299
1310
  # Date.new(2001, 2, 3).rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
1300
1311
  #
@@ -1304,8 +1315,8 @@ class Date
1304
1315
  # rdoc-file=ext/date/date_core.c
1305
1316
  # - rfc3339 -> string
1306
1317
  # -->
1307
- # Equivalent to #strftime with argument `'%FT%T%:z'`; see [Formats for Dates and
1308
- # Times](rdoc-ref:strftime_formatting.rdoc):
1318
+ # Equivalent to #strftime with argument <code>'%FT%T%:z'</code>; see [Formats
1319
+ # for Dates and Times](rdoc-ref:language/strftime_formatting.rdoc):
1309
1320
  #
1310
1321
  # Date.new(2001, 2, 3).rfc3339 # => "2001-02-03T00:00:00+00:00"
1311
1322
  #
@@ -1314,7 +1325,7 @@ class Date
1314
1325
  # <!-- rdoc-file=ext/date/date_core.c -->
1315
1326
  # Returns a new Date object with values parsed from `string`, which should be a
1316
1327
  # valid [RFC 2822 date
1317
- # format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
1328
+ # format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
1318
1329
  #
1319
1330
  # d = Date.new(2001, 2, 3)
1320
1331
  # s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
@@ -1322,7 +1333,7 @@ class Date
1322
1333
  #
1323
1334
  # See:
1324
1335
  #
1325
- # * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
1336
+ # * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
1326
1337
  # * Argument [limit](rdoc-ref:Date@Argument+limit).
1327
1338
  #
1328
1339
  # Related: Date._rfc2822 (returns a hash).
@@ -1355,7 +1366,7 @@ class Date
1355
1366
  # Date.new(2001, 2, 3, Date::GREGORIAN).start # => -Infinity
1356
1367
  # Date.new(2001, 2, 3, Date::JULIAN).start # => Infinity
1357
1368
  #
1358
- # See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
1369
+ # See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
1359
1370
  #
1360
1371
  def start: () -> Float
1361
1372
 
@@ -1366,8 +1377,8 @@ class Date
1366
1377
  # Calls the block with specified dates; returns `self`.
1367
1378
  #
1368
1379
  # * The first `date` is `self`.
1369
- # * Each successive `date` is `date + step`, where `step` is the numeric step
1370
- # size in days.
1380
+ # * Each successive `date` is <code>date + step</code>, where `step` is the
1381
+ # numeric step size in days.
1371
1382
  # * The last date is the last one that is before or equal to `limit`, which
1372
1383
  # should be a Date object.
1373
1384
  #
@@ -1401,7 +1412,7 @@ class Date
1401
1412
  # Date.new(2001, 2, 3).strftime # => "2001-02-03"
1402
1413
  #
1403
1414
  # For other formats, see [Formats for Dates and
1404
- # Times](rdoc-ref:strftime_formatting.rdoc).
1415
+ # Times](rdoc-ref:language/strftime_formatting.rdoc).
1405
1416
  #
1406
1417
  def strftime: (?String format) -> String
1407
1418
 
@@ -1453,8 +1464,9 @@ class Date
1453
1464
  # - to_s -> string
1454
1465
  # -->
1455
1466
  # Returns a string representation of the date in `self` in [ISO 8601 extended
1456
- # date format](rdoc-ref:strftime_formatting.rdoc@ISO+8601+Format+Specifications)
1457
- # (`'%Y-%m-%d'`):
1467
+ # date
1468
+ # format](rdoc-ref:language/strftime_formatting.rdoc@ISO+8601+Format+Specificati
1469
+ # ons) (<code>'%Y-%m-%d'</code>):
1458
1470
  #
1459
1471
  # Date.new(2001, 2, 3).to_s # => "2001-02-03"
1460
1472
  #
@@ -1508,9 +1520,10 @@ class Date
1508
1520
  def wednesday?: () -> bool
1509
1521
 
1510
1522
  # <!-- rdoc-file=ext/date/date_core.c -->
1511
- # Equivalent to #strftime with argument `'%Y-%m-%d'` (or its [shorthand
1512
- # form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
1513
- # `'%F'`);
1523
+ # Equivalent to #strftime with argument <code>'%Y-%m-%d'</code> (or its
1524
+ # [shorthand
1525
+ # form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
1526
+ # rs) <code>'%F'</code>);
1514
1527
  #
1515
1528
  # Date.new(2001, 2, 3).iso8601 # => "2001-02-03"
1516
1529
  #