rbs 3.10.0.pre.2 → 3.10.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.
- checksums.yaml +4 -4
- data/.github/workflows/c-check.yml +1 -1
- data/.github/workflows/comments.yml +2 -2
- data/.github/workflows/ruby.yml +7 -7
- data/CHANGELOG.md +49 -0
- data/core/array.rbs +56 -3
- data/core/complex.rbs +32 -21
- data/core/encoding.rbs +3 -7
- data/core/enumerable.rbs +1 -1
- data/core/enumerator.rbs +18 -1
- data/core/fiber.rbs +2 -1
- data/core/file.rbs +1 -1
- data/core/file_test.rbs +1 -1
- data/core/float.rbs +208 -21
- data/core/gc.rbs +4 -9
- data/core/hash.rbs +4 -4
- data/core/integer.rbs +78 -38
- data/core/io/buffer.rbs +18 -7
- data/core/io.rbs +8 -8
- data/core/kernel.rbs +8 -8
- data/core/module.rbs +17 -6
- data/core/numeric.rbs +8 -8
- data/core/object_space.rbs +13 -20
- data/core/pathname.rbs +2 -3
- data/core/ractor.rbs +4 -4
- data/core/range.rbs +1 -1
- data/core/rational.rbs +37 -24
- data/core/rbs/unnamed/argf.rbs +1 -1
- data/core/regexp.rbs +3 -3
- data/core/ruby.rbs +53 -0
- data/core/rubygems/version.rbs +2 -3
- data/core/set.rbs +86 -64
- data/core/string.rbs +275 -141
- data/core/thread.rbs +9 -9
- data/core/trace_point.rbs +7 -4
- data/lib/rbs/test/type_check.rb +1 -0
- data/lib/rbs/version.rb +1 -1
- data/lib/rdoc/discover.rb +1 -1
- data/stdlib/bigdecimal/0/big_decimal.rbs +100 -82
- data/stdlib/bigdecimal-math/0/big_math.rbs +169 -8
- data/stdlib/date/0/date.rbs +67 -59
- data/stdlib/date/0/date_time.rbs +1 -1
- data/stdlib/json/0/json.rbs +1 -0
- data/stdlib/objspace/0/objspace.rbs +1 -1
- data/stdlib/openssl/0/openssl.rbs +150 -80
- data/stdlib/psych/0/psych.rbs +3 -3
- data/stdlib/stringio/0/stringio.rbs +796 -37
- data/stdlib/strscan/0/string_scanner.rbs +1 -1
- data/stdlib/tempfile/0/tempfile.rbs +2 -2
- data/stdlib/time/0/time.rbs +1 -1
- data/stdlib/timeout/0/timeout.rbs +63 -7
- data/stdlib/uri/0/generic.rbs +1 -1
- metadata +3 -2
data/stdlib/date/0/date.rbs
CHANGED
|
@@ -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:
|
|
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:
|
|
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+
|
|
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
|
|
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
|
|
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.
|
|
@@ -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,
|
|
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:
|
|
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
|
|
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:
|
|
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+
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
496
|
-
#
|
|
497
|
-
#
|
|
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
|
#
|
|
@@ -510,7 +516,7 @@ class Date
|
|
|
510
516
|
#
|
|
511
517
|
# See:
|
|
512
518
|
#
|
|
513
|
-
# * Argument [start](rdoc-ref:
|
|
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:
|
|
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
|
|
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:
|
|
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:
|
|
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,
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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).
|
|
@@ -922,8 +929,8 @@ class Date
|
|
|
922
929
|
# - asctime -> string
|
|
923
930
|
# -->
|
|
924
931
|
# Equivalent to #strftime with argument `'%a %b %e %T %Y'` (or its [shorthand
|
|
925
|
-
# form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+
|
|
926
|
-
# `'%c'`):
|
|
932
|
+
# form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
|
|
933
|
+
# rs) `'%c'`):
|
|
927
934
|
#
|
|
928
935
|
# Date.new(2001, 2, 3).asctime # => "Sat Feb 3 00:00:00 2001"
|
|
929
936
|
#
|
|
@@ -933,8 +940,8 @@ class Date
|
|
|
933
940
|
|
|
934
941
|
# <!-- rdoc-file=ext/date/date_core.c -->
|
|
935
942
|
# Equivalent to #strftime with argument `'%a %b %e %T %Y'` (or its [shorthand
|
|
936
|
-
# form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+
|
|
937
|
-
# `'%c'`):
|
|
943
|
+
# form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
|
|
944
|
+
# rs) `'%c'`):
|
|
938
945
|
#
|
|
939
946
|
# Date.new(2001, 2, 3).asctime # => "Sat Feb 3 00:00:00 2001"
|
|
940
947
|
#
|
|
@@ -1065,7 +1072,7 @@ class Date
|
|
|
1065
1072
|
# - httpdate -> string
|
|
1066
1073
|
# -->
|
|
1067
1074
|
# Equivalent to #strftime with argument `'%a, %d %b %Y %T GMT'`; see [Formats
|
|
1068
|
-
# for Dates and Times](rdoc-ref:strftime_formatting.rdoc):
|
|
1075
|
+
# for Dates and Times](rdoc-ref:language/strftime_formatting.rdoc):
|
|
1069
1076
|
#
|
|
1070
1077
|
# Date.new(2001, 2, 3).httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
|
|
1071
1078
|
#
|
|
@@ -1087,8 +1094,8 @@ class Date
|
|
|
1087
1094
|
# - iso8601 -> string
|
|
1088
1095
|
# -->
|
|
1089
1096
|
# Equivalent to #strftime with argument `'%Y-%m-%d'` (or its [shorthand
|
|
1090
|
-
# form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+
|
|
1091
|
-
# `'%F'`);
|
|
1097
|
+
# form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
|
|
1098
|
+
# rs) `'%F'`);
|
|
1092
1099
|
#
|
|
1093
1100
|
# Date.new(2001, 2, 3).iso8601 # => "2001-02-03"
|
|
1094
1101
|
#
|
|
@@ -1225,7 +1232,7 @@ class Date
|
|
|
1225
1232
|
# d1 = d0.new_start(Date::JULIAN)
|
|
1226
1233
|
# d1.julian? # => true
|
|
1227
1234
|
#
|
|
1228
|
-
# See argument [start](rdoc-ref:
|
|
1235
|
+
# See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
|
|
1229
1236
|
#
|
|
1230
1237
|
def new_start: (?Integer start) -> Date
|
|
1231
1238
|
|
|
@@ -1294,7 +1301,7 @@ class Date
|
|
|
1294
1301
|
# - rfc2822 -> string
|
|
1295
1302
|
# -->
|
|
1296
1303
|
# Equivalent to #strftime with argument `'%a, %-d %b %Y %T %z'`; see [Formats
|
|
1297
|
-
# for Dates and Times](rdoc-ref:strftime_formatting.rdoc):
|
|
1304
|
+
# for Dates and Times](rdoc-ref:language/strftime_formatting.rdoc):
|
|
1298
1305
|
#
|
|
1299
1306
|
# Date.new(2001, 2, 3).rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
|
|
1300
1307
|
#
|
|
@@ -1305,7 +1312,7 @@ class Date
|
|
|
1305
1312
|
# - rfc3339 -> string
|
|
1306
1313
|
# -->
|
|
1307
1314
|
# Equivalent to #strftime with argument `'%FT%T%:z'`; see [Formats for Dates and
|
|
1308
|
-
# Times](rdoc-ref:strftime_formatting.rdoc):
|
|
1315
|
+
# Times](rdoc-ref:language/strftime_formatting.rdoc):
|
|
1309
1316
|
#
|
|
1310
1317
|
# Date.new(2001, 2, 3).rfc3339 # => "2001-02-03T00:00:00+00:00"
|
|
1311
1318
|
#
|
|
@@ -1314,7 +1321,7 @@ class Date
|
|
|
1314
1321
|
# <!-- rdoc-file=ext/date/date_core.c -->
|
|
1315
1322
|
# Returns a new Date object with values parsed from `string`, which should be a
|
|
1316
1323
|
# valid [RFC 2822 date
|
|
1317
|
-
# format](rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format):
|
|
1324
|
+
# format](rdoc-ref:language/strftime_formatting.rdoc@RFC+2822+Format):
|
|
1318
1325
|
#
|
|
1319
1326
|
# d = Date.new(2001, 2, 3)
|
|
1320
1327
|
# s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
|
|
@@ -1322,7 +1329,7 @@ class Date
|
|
|
1322
1329
|
#
|
|
1323
1330
|
# See:
|
|
1324
1331
|
#
|
|
1325
|
-
# * Argument [start](rdoc-ref:
|
|
1332
|
+
# * Argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
|
|
1326
1333
|
# * Argument [limit](rdoc-ref:Date@Argument+limit).
|
|
1327
1334
|
#
|
|
1328
1335
|
# Related: Date._rfc2822 (returns a hash).
|
|
@@ -1355,7 +1362,7 @@ class Date
|
|
|
1355
1362
|
# Date.new(2001, 2, 3, Date::GREGORIAN).start # => -Infinity
|
|
1356
1363
|
# Date.new(2001, 2, 3, Date::JULIAN).start # => Infinity
|
|
1357
1364
|
#
|
|
1358
|
-
# See argument [start](rdoc-ref:
|
|
1365
|
+
# See argument [start](rdoc-ref:language/calendars.rdoc@Argument+start).
|
|
1359
1366
|
#
|
|
1360
1367
|
def start: () -> Float
|
|
1361
1368
|
|
|
@@ -1401,7 +1408,7 @@ class Date
|
|
|
1401
1408
|
# Date.new(2001, 2, 3).strftime # => "2001-02-03"
|
|
1402
1409
|
#
|
|
1403
1410
|
# For other formats, see [Formats for Dates and
|
|
1404
|
-
# Times](rdoc-ref:strftime_formatting.rdoc).
|
|
1411
|
+
# Times](rdoc-ref:language/strftime_formatting.rdoc).
|
|
1405
1412
|
#
|
|
1406
1413
|
def strftime: (?String format) -> String
|
|
1407
1414
|
|
|
@@ -1453,8 +1460,9 @@ class Date
|
|
|
1453
1460
|
# - to_s -> string
|
|
1454
1461
|
# -->
|
|
1455
1462
|
# Returns a string representation of the date in `self` in [ISO 8601 extended
|
|
1456
|
-
# date
|
|
1457
|
-
# (
|
|
1463
|
+
# date
|
|
1464
|
+
# format](rdoc-ref:language/strftime_formatting.rdoc@ISO+8601+Format+Specificati
|
|
1465
|
+
# ons) (`'%Y-%m-%d'`):
|
|
1458
1466
|
#
|
|
1459
1467
|
# Date.new(2001, 2, 3).to_s # => "2001-02-03"
|
|
1460
1468
|
#
|
|
@@ -1509,8 +1517,8 @@ class Date
|
|
|
1509
1517
|
|
|
1510
1518
|
# <!-- rdoc-file=ext/date/date_core.c -->
|
|
1511
1519
|
# Equivalent to #strftime with argument `'%Y-%m-%d'` (or its [shorthand
|
|
1512
|
-
# form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+
|
|
1513
|
-
# `'%F'`);
|
|
1520
|
+
# form](rdoc-ref:language/strftime_formatting.rdoc@Shorthand+Conversion+Specifie
|
|
1521
|
+
# rs) `'%F'`);
|
|
1514
1522
|
#
|
|
1515
1523
|
# Date.new(2001, 2, 3).iso8601 # => "2001-02-03"
|
|
1516
1524
|
#
|
data/stdlib/date/0/date_time.rbs
CHANGED
|
@@ -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:strftime_formatting.rdoc):
|
|
558
|
+
# Times](rdoc-ref:language/strftime_formatting.rdoc):
|
|
559
559
|
#
|
|
560
560
|
def strftime: (?String format) -> String
|
|
561
561
|
|
data/stdlib/json/0/json.rbs
CHANGED
|
@@ -880,6 +880,7 @@ module JSON
|
|
|
880
880
|
|
|
881
881
|
# <!--
|
|
882
882
|
# rdoc-file=ext/json/lib/json/common.rb
|
|
883
|
+
# - JSON.load(source, options = {}) -> object
|
|
883
884
|
# - JSON.load(source, proc = nil, options = {}) -> object
|
|
884
885
|
# -->
|
|
885
886
|
# Returns the Ruby objects created by parsing the given `source`.
|
|
@@ -411,7 +411,7 @@ module ObjectSpace
|
|
|
411
411
|
# ObjectSpace.reachable_objects_from(1)
|
|
412
412
|
# #=> nil # 1 is not markable (heap managed) object
|
|
413
413
|
#
|
|
414
|
-
def self?.reachable_objects_from: (untyped) -> ([
|
|
414
|
+
def self?.reachable_objects_from: (untyped) -> (Array[untyped] | nil)
|
|
415
415
|
|
|
416
416
|
# <!--
|
|
417
417
|
# rdoc-file=ext/objspace/objspace.c
|