rbs 3.8.0.pre.1 → 3.8.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.
- checksums.yaml +4 -4
- data/.github/workflows/comments.yml +3 -3
- data/.github/workflows/ruby.yml +7 -7
- data/.rubocop.yml +7 -0
- data/CHANGELOG.md +30 -0
- data/core/array.rbs +64 -62
- data/core/complex.rbs +1 -1
- data/core/encoding.rbs +0 -26
- data/core/errors.rbs +4 -0
- data/core/exception.rbs +149 -40
- data/core/file.rbs +1 -8
- data/core/gc.rbs +21 -3
- data/core/hash.rbs +2 -2
- data/core/io.rbs +2 -2
- data/core/kernel.rbs +58 -16
- data/core/nil_class.rbs +3 -0
- data/core/numeric.rbs +1 -1
- data/core/proc.rbs +80 -10
- data/core/ractor.rbs +20 -0
- data/core/regexp.rbs +6 -4
- data/core/ruby_vm.rbs +9 -9
- data/core/rubygems/errors.rbs +3 -1
- data/core/rubygems/rubygems.rbs +3 -1
- data/core/string.rbs +132 -130
- data/core/time.rbs +5 -1
- data/core/trace_point.rbs +108 -113
- data/ext/rbs_extension/parser.c +1 -1
- data/lib/rbs/types.rb +2 -1
- data/lib/rbs/version.rb +1 -1
- data/stdlib/date/0/date.rbs +23 -23
- data/stdlib/monitor/0/monitor.rbs +13 -4
- data/stdlib/net-http/0/net-http.rbs +20 -29
- data/stdlib/rdoc/0/rdoc.rbs +12 -6
- data/stdlib/resolv/0/resolv.rbs +5 -1
- data/stdlib/securerandom/0/securerandom.rbs +7 -0
- data/stdlib/socket/0/socket.rbs +9 -28
- data/stdlib/socket/0/tcp_socket.rbs +8 -30
- data/stdlib/tmpdir/0/tmpdir.rbs +2 -2
- metadata +3 -4
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: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
|
#
|
@@ -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:calendars.rdoc@Argument+start).
|
91
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
92
92
|
#
|
93
93
|
# Related: Date.jd.
|
94
94
|
#
|
@@ -309,7 +309,7 @@ class Date
|
|
309
309
|
# Date.commercial(2020, 1, 1).to_s # => "2019-12-30"
|
310
310
|
# Date.commercial(2020, 1, 7).to_s # => "2020-01-05"
|
311
311
|
#
|
312
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
312
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
313
313
|
#
|
314
314
|
# Related: Date.jd, Date.new, Date.ordinal.
|
315
315
|
#
|
@@ -343,7 +343,7 @@ class Date
|
|
343
343
|
#
|
344
344
|
# See:
|
345
345
|
#
|
346
|
-
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
346
|
+
# * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
347
347
|
# * Argument [limit](rdoc-ref:Date@Argument+limit).
|
348
348
|
#
|
349
349
|
# Related: Date._httpdate (returns a hash).
|
@@ -364,7 +364,7 @@ class Date
|
|
364
364
|
#
|
365
365
|
# See:
|
366
366
|
#
|
367
|
-
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
367
|
+
# * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
368
368
|
# * Argument [limit](rdoc-ref:Date@Argument+limit).
|
369
369
|
#
|
370
370
|
# Related: Date._iso8601 (returns a hash).
|
@@ -393,7 +393,7 @@ class Date
|
|
393
393
|
#
|
394
394
|
# Date.jd(Date::ITALY - 1).julian? # => true
|
395
395
|
#
|
396
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
396
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
397
397
|
#
|
398
398
|
# Related: Date.new.
|
399
399
|
#
|
@@ -417,7 +417,7 @@ class Date
|
|
417
417
|
#
|
418
418
|
# See:
|
419
419
|
#
|
420
|
-
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
420
|
+
# * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
421
421
|
# * Argument [limit](rdoc-ref:Date@Argument+limit).
|
422
422
|
#
|
423
423
|
# Related: Date._jisx0301 (returns a hash).
|
@@ -480,7 +480,7 @@ class Date
|
|
480
480
|
#
|
481
481
|
# Raises an exception if `yday` is zero or out of range.
|
482
482
|
#
|
483
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
483
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
484
484
|
#
|
485
485
|
# Related: Date.jd, Date.new.
|
486
486
|
#
|
@@ -510,7 +510,7 @@ class Date
|
|
510
510
|
#
|
511
511
|
# See:
|
512
512
|
#
|
513
|
-
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
513
|
+
# * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
514
514
|
# * Argument [limit](rdoc-ref:Date@Argument+limit).
|
515
515
|
#
|
516
516
|
# Related: Date._parse (returns a hash).
|
@@ -531,7 +531,7 @@ class Date
|
|
531
531
|
#
|
532
532
|
# See:
|
533
533
|
#
|
534
|
-
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
534
|
+
# * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
535
535
|
# * Argument [limit](rdoc-ref:Date@Argument+limit).
|
536
536
|
#
|
537
537
|
# Related: Date._rfc2822 (returns a hash).
|
@@ -551,7 +551,7 @@ class Date
|
|
551
551
|
#
|
552
552
|
# See:
|
553
553
|
#
|
554
|
-
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
554
|
+
# * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
555
555
|
# * Argument [limit](rdoc-ref:Date@Argument+limit).
|
556
556
|
#
|
557
557
|
# Related: Date._rfc3339 (returns a hash).
|
@@ -572,7 +572,7 @@ class Date
|
|
572
572
|
#
|
573
573
|
# See:
|
574
574
|
#
|
575
|
-
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
575
|
+
# * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
576
576
|
# * Argument [limit](rdoc-ref:Date@Argument+limit).
|
577
577
|
#
|
578
578
|
# Related: Date._rfc2822 (returns a hash).
|
@@ -598,7 +598,7 @@ class Date
|
|
598
598
|
# Times](rdoc-ref:strftime_formatting.rdoc). (Unlike Date.strftime, does not
|
599
599
|
# support flags and width.)
|
600
600
|
#
|
601
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
601
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
602
602
|
#
|
603
603
|
# See also [strptime(3)](https://man7.org/linux/man-pages/man3/strptime.3.html).
|
604
604
|
#
|
@@ -614,7 +614,7 @@ class Date
|
|
614
614
|
#
|
615
615
|
# Date.today.to_s # => "2022-07-06"
|
616
616
|
#
|
617
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
617
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
618
618
|
#
|
619
619
|
def self.today: (?Integer start) -> Date
|
620
620
|
|
@@ -629,7 +629,7 @@ class Date
|
|
629
629
|
# Date.valid_date?(2001, 2, 29) # => false
|
630
630
|
# Date.valid_date?(2001, 2, -1) # => true
|
631
631
|
#
|
632
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
632
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
633
633
|
#
|
634
634
|
# Related: Date.jd, Date.new.
|
635
635
|
#
|
@@ -647,7 +647,7 @@ class Date
|
|
647
647
|
#
|
648
648
|
# See Date.commercial.
|
649
649
|
#
|
650
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
650
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
651
651
|
#
|
652
652
|
# Related: Date.jd, Date.commercial.
|
653
653
|
#
|
@@ -664,7 +664,7 @@ class Date
|
|
664
664
|
# Date.valid_date?(2001, 2, 29) # => false
|
665
665
|
# Date.valid_date?(2001, 2, -1) # => true
|
666
666
|
#
|
667
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
667
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
668
668
|
#
|
669
669
|
# Related: Date.jd, Date.new.
|
670
670
|
#
|
@@ -679,7 +679,7 @@ class Date
|
|
679
679
|
#
|
680
680
|
# Date.valid_jd?(2451944) # => true
|
681
681
|
#
|
682
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
682
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
683
683
|
#
|
684
684
|
# Related: Date.jd.
|
685
685
|
#
|
@@ -695,7 +695,7 @@ class Date
|
|
695
695
|
# Date.valid_ordinal?(2001, 34) # => true
|
696
696
|
# Date.valid_ordinal?(2001, 366) # => false
|
697
697
|
#
|
698
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
698
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
699
699
|
#
|
700
700
|
# Related: Date.jd, Date.ordinal.
|
701
701
|
#
|
@@ -714,7 +714,7 @@ class Date
|
|
714
714
|
#
|
715
715
|
# See:
|
716
716
|
#
|
717
|
-
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
717
|
+
# * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
718
718
|
# * Argument [limit](rdoc-ref:Date@Argument+limit).
|
719
719
|
#
|
720
720
|
# Related: Date._xmlschema (returns a hash).
|
@@ -1225,7 +1225,7 @@ class Date
|
|
1225
1225
|
# d1 = d0.new_start(Date::JULIAN)
|
1226
1226
|
# d1.julian? # => true
|
1227
1227
|
#
|
1228
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
1228
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
1229
1229
|
#
|
1230
1230
|
def new_start: (?Integer start) -> Date
|
1231
1231
|
|
@@ -1322,7 +1322,7 @@ class Date
|
|
1322
1322
|
#
|
1323
1323
|
# See:
|
1324
1324
|
#
|
1325
|
-
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
1325
|
+
# * Argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
1326
1326
|
# * Argument [limit](rdoc-ref:Date@Argument+limit).
|
1327
1327
|
#
|
1328
1328
|
# Related: Date._rfc2822 (returns a hash).
|
@@ -1355,7 +1355,7 @@ class Date
|
|
1355
1355
|
# Date.new(2001, 2, 3, Date::GREGORIAN).start # => -Infinity
|
1356
1356
|
# Date.new(2001, 2, 3, Date::JULIAN).start # => Infinity
|
1357
1357
|
#
|
1358
|
-
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
|
1358
|
+
# See argument [start](rdoc-ref:date/calendars.rdoc@Argument+start).
|
1359
1359
|
#
|
1360
1360
|
def start: () -> Float
|
1361
1361
|
|
@@ -12,15 +12,17 @@
|
|
12
12
|
class Monitor
|
13
13
|
# <!--
|
14
14
|
# rdoc-file=ext/monitor/monitor.c
|
15
|
-
# - enter
|
15
|
+
# - enter -> nil
|
16
16
|
# -->
|
17
|
+
# Enters exclusive section.
|
17
18
|
#
|
18
19
|
def enter: () -> nil
|
19
20
|
|
20
21
|
# <!--
|
21
22
|
# rdoc-file=ext/monitor/monitor.c
|
22
|
-
# - exit
|
23
|
+
# - exit -> nil
|
23
24
|
# -->
|
25
|
+
# Leaves exclusive section.
|
24
26
|
#
|
25
27
|
def exit: () -> nil
|
26
28
|
|
@@ -77,20 +79,25 @@ class Monitor
|
|
77
79
|
# rdoc-file=ext/monitor/lib/monitor.rb
|
78
80
|
# - new_cond()
|
79
81
|
# -->
|
82
|
+
# Creates a new MonitorMixin::ConditionVariable associated with the Monitor
|
83
|
+
# object.
|
80
84
|
#
|
81
85
|
def new_cond: () -> ::MonitorMixin::ConditionVariable
|
82
86
|
|
83
87
|
# <!--
|
84
88
|
# rdoc-file=ext/monitor/monitor.c
|
85
|
-
# - synchronize
|
89
|
+
# - synchronize { } -> result of the block
|
86
90
|
# -->
|
91
|
+
# Enters exclusive section and executes the block. Leaves the exclusive section
|
92
|
+
# automatically when the block exits. See example under `MonitorMixin`.
|
87
93
|
#
|
88
94
|
def synchronize: [T] () { () -> T } -> T
|
89
95
|
|
90
96
|
# <!--
|
91
97
|
# rdoc-file=ext/monitor/monitor.c
|
92
|
-
# - try_enter
|
98
|
+
# - try_enter -> true or false
|
93
99
|
# -->
|
100
|
+
# Attempts to enter exclusive section. Returns `false` if lock fails.
|
94
101
|
#
|
95
102
|
def try_enter: () -> bool
|
96
103
|
|
@@ -279,6 +286,8 @@ module MonitorMixin
|
|
279
286
|
# rdoc-file=ext/monitor/lib/monitor.rb
|
280
287
|
# - mon_check_owner()
|
281
288
|
# -->
|
289
|
+
# Ensures that the MonitorMixin is owned by the current thread, otherwise raises
|
290
|
+
# an exception.
|
282
291
|
#
|
283
292
|
def mon_check_owner: () -> nil
|
284
293
|
|
@@ -487,8 +487,7 @@ module Net
|
|
487
487
|
#
|
488
488
|
# * [::start](rdoc-ref:Net::HTTP.start): Begins a new session in a new
|
489
489
|
# Net::HTTP object.
|
490
|
-
# * [#started?](rdoc-ref:Net::HTTP#started?)
|
491
|
-
# [#active?](rdoc-ref:Net::HTTP#active?)): Returns whether in a session.
|
490
|
+
# * [#started?](rdoc-ref:Net::HTTP#started?): Returns whether in a session.
|
492
491
|
# * [#finish](rdoc-ref:Net::HTTP#finish): Ends an active session.
|
493
492
|
# * [#start](rdoc-ref:Net::HTTP#start): Begins a new session in an existing
|
494
493
|
# Net::HTTP object (`self`).
|
@@ -562,18 +561,15 @@ module Net
|
|
562
561
|
# object.
|
563
562
|
# * [#request](rdoc-ref:Net::HTTP#request): Sends a request and returns a
|
564
563
|
# response object.
|
565
|
-
# * [#request_get](rdoc-ref:Net::HTTP#request_get)
|
566
|
-
#
|
567
|
-
#
|
568
|
-
#
|
569
|
-
#
|
570
|
-
#
|
571
|
-
#
|
572
|
-
#
|
573
|
-
#
|
574
|
-
# [#post2](rdoc-ref:Net::HTTP#post2)): Sends a POST request and forms a
|
575
|
-
# response object; if a block given, calls the block with the object,
|
576
|
-
# otherwise returns the object.
|
564
|
+
# * [#request_get](rdoc-ref:Net::HTTP#request_get): Sends a GET request and
|
565
|
+
# forms a response object; if a block given, calls the block with the
|
566
|
+
# object, otherwise returns the object.
|
567
|
+
# * [#request_head](rdoc-ref:Net::HTTP#request_head): Sends a HEAD request and
|
568
|
+
# forms a response object; if a block given, calls the block with the
|
569
|
+
# object, otherwise returns the object.
|
570
|
+
# * [#request_post](rdoc-ref:Net::HTTP#request_post): Sends a POST request and
|
571
|
+
# forms a response object; if a block given, calls the block with the
|
572
|
+
# object, otherwise returns the object.
|
577
573
|
# * [#send_request](rdoc-ref:Net::HTTP#send_request): Sends a request and
|
578
574
|
# returns a response object.
|
579
575
|
# * [#trace](rdoc-ref:Net::HTTP#trace): Sends a TRACE request and returns a
|
@@ -605,8 +601,8 @@ module Net
|
|
605
601
|
# * [::proxy_class?](rdoc-ref:Net::HTTP.proxy_class?): Returns whether `self`
|
606
602
|
# is a proxy class.
|
607
603
|
# * [#proxy?](rdoc-ref:Net::HTTP#proxy?): Returns whether `self` has a proxy.
|
608
|
-
# * [#proxy_address](rdoc-ref:Net::HTTP#proxy_address)
|
609
|
-
#
|
604
|
+
# * [#proxy_address](rdoc-ref:Net::HTTP#proxy_address): Returns the proxy
|
605
|
+
# address.
|
610
606
|
# * [#proxy_from_env?](rdoc-ref:Net::HTTP#proxy_from_env?): Returns whether
|
611
607
|
# the proxy is taken from an environment variable.
|
612
608
|
# * [:proxy_from_env=](rdoc-ref:Net::HTTP#proxy_from_env=): Sets whether the
|
@@ -709,7 +705,6 @@ module Net
|
|
709
705
|
# ### HTTP Version
|
710
706
|
#
|
711
707
|
# * [::version_1_2?](rdoc-ref:Net::HTTP.version_1_2?) (aliased as
|
712
|
-
# [::is_version_1_2?](rdoc-ref:Net::HTTP.is_version_1_2?) and
|
713
708
|
# [::version_1_2](rdoc-ref:Net::HTTP.version_1_2)): Returns true; retained
|
714
709
|
# for compatibility.
|
715
710
|
#
|
@@ -1359,16 +1354,15 @@ module Net
|
|
1359
1354
|
|
1360
1355
|
# <!-- rdoc-file=lib/net/http.rb -->
|
1361
1356
|
# Sets or returns the available SSL ciphers. See
|
1362
|
-
# [
|
1363
|
-
# 3D).
|
1357
|
+
# [:SSL::SSLContext#ciphers=](OpenSSL::SSL::SSL::Context#ciphers=).
|
1364
1358
|
#
|
1365
1359
|
attr_accessor ciphers: untyped
|
1366
1360
|
|
1367
1361
|
# <!-- rdoc-file=lib/net/http.rb -->
|
1368
1362
|
# Sets or returns the extra X509 certificates to be added to the certificate
|
1369
1363
|
# chain. See
|
1370
|
-
# [
|
1371
|
-
#
|
1364
|
+
# [:SSL::SSLContext#add_certificate](OpenSSL::SSL::SSL::Context#add_certificate)
|
1365
|
+
# .
|
1372
1366
|
#
|
1373
1367
|
attr_accessor extra_chain_cert: untyped
|
1374
1368
|
|
@@ -1384,22 +1378,19 @@ module Net
|
|
1384
1378
|
|
1385
1379
|
# <!-- rdoc-file=lib/net/http.rb -->
|
1386
1380
|
# Sets or returns the SSL version. See
|
1387
|
-
# [
|
1388
|
-
# version-3D).
|
1381
|
+
# [:SSL::SSLContext#ssl_version=](OpenSSL::SSL::SSL::Context#ssl_version=).
|
1389
1382
|
#
|
1390
1383
|
attr_accessor ssl_version: untyped
|
1391
1384
|
|
1392
1385
|
# <!-- rdoc-file=lib/net/http.rb -->
|
1393
1386
|
# Sets or returns the minimum SSL version. See
|
1394
|
-
# [
|
1395
|
-
# version-3D).
|
1387
|
+
# [:SSL::SSLContext#min_version=](OpenSSL::SSL::SSL::Context#min_version=).
|
1396
1388
|
#
|
1397
1389
|
attr_accessor min_version: untyped
|
1398
1390
|
|
1399
1391
|
# <!-- rdoc-file=lib/net/http.rb -->
|
1400
1392
|
# Sets or returns the maximum SSL version. See
|
1401
|
-
# [
|
1402
|
-
# version-3D).
|
1393
|
+
# [:SSL::SSLContext#max_version=](OpenSSL::SSL::SSL::Context#max_version=).
|
1403
1394
|
#
|
1404
1395
|
attr_accessor max_version: untyped
|
1405
1396
|
|
@@ -1423,8 +1414,8 @@ module Net
|
|
1423
1414
|
# <!-- rdoc-file=lib/net/http.rb -->
|
1424
1415
|
# Sets or returns whether to verify that the server certificate is valid for the
|
1425
1416
|
# hostname. See
|
1426
|
-
# [
|
1427
|
-
#
|
1417
|
+
# [:SSL::SSLContext#verify_hostname=](OpenSSL::SSL::SSL::Context#verify_hostname
|
1418
|
+
# =).
|
1428
1419
|
#
|
1429
1420
|
attr_accessor verify_hostname: untyped
|
1430
1421
|
|
data/stdlib/rdoc/0/rdoc.rbs
CHANGED
@@ -1,9 +1,3 @@
|
|
1
|
-
# <!-- rdoc-file=lib/rdoc/rubygems_hook.rb -->
|
2
|
-
# Gem::RDoc provides methods to generate RDoc and ri data for installed gems
|
3
|
-
# upon gem installation.
|
4
|
-
#
|
5
|
-
# This file is automatically required by RubyGems 1.9 and newer.
|
6
|
-
#
|
7
1
|
# <!-- rdoc-file=lib/rdoc.rb -->
|
8
2
|
# RDoc produces documentation for Ruby source files by parsing the source and
|
9
3
|
# extracting the definition for classes, modules, methods, includes and
|
@@ -55,6 +49,18 @@
|
|
55
49
|
# of Keiju ISHITSUKA of Nippon Rational Inc, who produced the Ruby parser
|
56
50
|
# for irb and the rtags package.
|
57
51
|
#
|
52
|
+
# <!-- rdoc-file=lib/rdoc/rubygems_hook.rb -->
|
53
|
+
# This class is referenced by RubyGems to create documents. All implementations
|
54
|
+
# are moved to the above RubyGemsHook.
|
55
|
+
#
|
56
|
+
# This class does nothing when this RDoc is installed as a normal gem or a
|
57
|
+
# bundled gem.
|
58
|
+
#
|
59
|
+
# This class does generate/remove documents for compatibility when this RDoc is
|
60
|
+
# installed as a default gem.
|
61
|
+
#
|
62
|
+
# We can remove this when all maintained RubyGems remove `rubygems/rdoc.rb`.
|
63
|
+
#
|
58
64
|
module RDoc
|
59
65
|
# <!-- rdoc-file=lib/rdoc/token_stream.rb -->
|
60
66
|
# A TokenStream is a list of tokens, gathered during the parse of some entity
|
data/stdlib/resolv/0/resolv.rbs
CHANGED
@@ -126,10 +126,14 @@ class Resolv
|
|
126
126
|
|
127
127
|
# <!--
|
128
128
|
# rdoc-file=lib/resolv.rb
|
129
|
-
# - new(resolvers=nil, use_ipv6: nil)
|
129
|
+
# - new(resolvers=(arg_not_set = true; nil), use_ipv6: (keyword_not_set = true; nil))
|
130
130
|
# -->
|
131
131
|
# Creates a new Resolv using `resolvers`.
|
132
132
|
#
|
133
|
+
# If `resolvers` is not given, a hash, or `nil`, uses a Hosts resolver and and a
|
134
|
+
# DNS resolver. If `resolvers` is a hash, uses the hash as configuration for
|
135
|
+
# the DNS resolver.
|
136
|
+
#
|
133
137
|
def initialize: (?Resolv::Hosts | Resolv::DNS resolvers) -> untyped
|
134
138
|
end
|
135
139
|
|
@@ -37,6 +37,13 @@
|
|
37
37
|
module SecureRandom
|
38
38
|
extend Random::Formatter
|
39
39
|
|
40
|
+
# <!--
|
41
|
+
# rdoc-file=lib/securerandom.rb
|
42
|
+
# - alphanumeric(n = nil, chars: ALPHANUMERIC)
|
43
|
+
# -->
|
44
|
+
# Compatibility methods for Ruby 3.2, we can remove this after dropping to
|
45
|
+
# support Ruby 3.2
|
46
|
+
#
|
40
47
|
def self.alphanumeric: (?Integer?) -> String
|
41
48
|
|
42
49
|
def self.base64: (?Integer?) -> String
|
data/stdlib/socket/0/socket.rbs
CHANGED
@@ -462,8 +462,13 @@ class Socket < BasicSocket
|
|
462
462
|
# Version 2 ([RFC 8305](https://datatracker.ietf.org/doc/html/rfc8305))
|
463
463
|
# algorithm by default.
|
464
464
|
#
|
465
|
+
# For details on Happy Eyeballs Version 2, see
|
466
|
+
# [Socket.tcp_fast_fallback=](rdoc-ref:Socket.tcp_fast_fallback=).
|
467
|
+
#
|
465
468
|
# To make it behave the same as in Ruby 3.3 and earlier, explicitly specify the
|
466
|
-
# option
|
469
|
+
# option fast_fallback:false. Or, setting Socket.tcp_fast_fallback=false will
|
470
|
+
# disable Happy Eyeballs Version 2 not only for this method but for all Socket
|
471
|
+
# globally.
|
467
472
|
#
|
468
473
|
# If local_host:local_port is given, the socket is bound to it.
|
469
474
|
#
|
@@ -498,31 +503,6 @@ class Socket < BasicSocket
|
|
498
503
|
# puts sock.read
|
499
504
|
# }
|
500
505
|
#
|
501
|
-
# ### Happy Eyeballs Version 2
|
502
|
-
# Happy Eyeballs Version 2 ([RFC
|
503
|
-
# 8305](https://datatracker.ietf.org/doc/html/rfc8305)) is an algorithm designed
|
504
|
-
# to improve client socket connectivity.
|
505
|
-
# It aims for more reliable and efficient connections by performing hostname
|
506
|
-
# resolution and connection attempts in parallel, instead of serially.
|
507
|
-
#
|
508
|
-
# Starting from Ruby 3.4, this method operates as follows with this algorithm:
|
509
|
-
#
|
510
|
-
# 1. Start resolving both IPv6 and IPv4 addresses concurrently.
|
511
|
-
# 2. Start connecting to the one of the addresses that are obtained first.
|
512
|
-
# If IPv4 addresses are obtained first, the method waits 50 ms for IPv6 name
|
513
|
-
# resolution to prioritize IPv6 connections.
|
514
|
-
# 3. After starting a connection attempt, wait 250 ms for the connection to be
|
515
|
-
# established.
|
516
|
-
# If no connection is established within this time, a new connection is
|
517
|
-
# started every 250 ms
|
518
|
-
# until a connection is established or there are no more candidate
|
519
|
-
# addresses.
|
520
|
-
# (Although RFC 8305 strictly specifies sorting addresses,
|
521
|
-
# this method only alternates between IPv6 / IPv4 addresses due to the
|
522
|
-
# performance concerns)
|
523
|
-
# 4. Once a connection is established, all remaining connection attempts are
|
524
|
-
# canceled.
|
525
|
-
#
|
526
506
|
def self.tcp: (String host, Integer port, ?String local_host, ?Integer local_port, ?resolv_timeout: Time::_Timeout, ?connect_timeout: Time::_Timeout) -> instance
|
527
507
|
| (String host, Integer port, ?String local_host, ?Integer local_port, ?resolv_timeout: Time::_Timeout, ?connect_timeout: Time::_Timeout) { (instance) -> void } -> void
|
528
508
|
|
@@ -1077,7 +1057,8 @@ class Socket < BasicSocket
|
|
1077
1057
|
# otherwise an exception is raised.
|
1078
1058
|
#
|
1079
1059
|
# ### Parameter
|
1080
|
-
#
|
1060
|
+
# * `remote_sockaddr` - the `struct` sockaddr contained in a string or
|
1061
|
+
# Addrinfo object
|
1081
1062
|
#
|
1082
1063
|
# ### Example:
|
1083
1064
|
# # Pull down Google's web page
|
@@ -1112,7 +1093,7 @@ class Socket < BasicSocket
|
|
1112
1093
|
# the symbol `:wait_writable` instead.
|
1113
1094
|
#
|
1114
1095
|
# ### See
|
1115
|
-
#
|
1096
|
+
# * Socket#connect
|
1116
1097
|
#
|
1117
1098
|
def connect_nonblock: (untyped addr, ?exception: untyped) -> (Integer | :wait_writable)
|
1118
1099
|
|
@@ -48,11 +48,16 @@ class TCPSocket < IPSocket
|
|
48
48
|
# Version 2 ([RFC 8305](https://datatracker.ietf.org/doc/html/rfc8305))
|
49
49
|
# algorithm by default, except on Windows.
|
50
50
|
#
|
51
|
+
# For details on Happy Eyeballs Version 2, see
|
52
|
+
# [Socket.tcp_fast_fallback=](rdoc-ref:Socket.tcp_fast_fallback=).
|
53
|
+
#
|
51
54
|
# To make it behave the same as in Ruby 3.3 and earlier, explicitly specify the
|
52
|
-
# option
|
55
|
+
# option fast_fallback:false. Or, setting Socket.tcp_fast_fallback=false will
|
56
|
+
# disable Happy Eyeballs Version 2 not only for this method but for all Socket
|
57
|
+
# globally.
|
53
58
|
#
|
54
|
-
# Happy Eyeballs Version 2 is not provided
|
55
|
-
# as in Ruby 3.3 and earlier.
|
59
|
+
# When using TCPSocket.new on Windows, Happy Eyeballs Version 2 is not provided,
|
60
|
+
# and it behaves the same as in Ruby 3.3 and earlier.
|
56
61
|
#
|
57
62
|
# :resolv_timeout
|
58
63
|
# : Specifies the timeout in seconds from when the hostname resolution starts.
|
@@ -70,32 +75,5 @@ class TCPSocket < IPSocket
|
|
70
75
|
# :fast_fallback
|
71
76
|
# : Enables the Happy Eyeballs Version 2 algorithm (enabled by default).
|
72
77
|
#
|
73
|
-
#
|
74
|
-
# ### Happy Eyeballs Version 2
|
75
|
-
# Happy Eyeballs Version 2 ([RFC
|
76
|
-
# 8305](https://datatracker.ietf.org/doc/html/rfc8305)) is an algorithm designed
|
77
|
-
# to improve client socket connectivity.
|
78
|
-
# It aims for more reliable and efficient connections by performing hostname
|
79
|
-
# resolution and connection attempts in parallel, instead of serially.
|
80
|
-
#
|
81
|
-
# Starting from Ruby 3.4, this method operates as follows with this algorithm
|
82
|
-
# except on Windows:
|
83
|
-
#
|
84
|
-
# 1. Start resolving both IPv6 and IPv4 addresses concurrently.
|
85
|
-
# 2. Start connecting to the one of the addresses that are obtained first.
|
86
|
-
# If IPv4 addresses are obtained first, the method waits 50 ms for IPv6 name
|
87
|
-
# resolution to prioritize IPv6 connections.
|
88
|
-
# 3. After starting a connection attempt, wait 250 ms for the connection to be
|
89
|
-
# established.
|
90
|
-
# If no connection is established within this time, a new connection is
|
91
|
-
# started every 250 ms
|
92
|
-
# until a connection is established or there are no more candidate
|
93
|
-
# addresses.
|
94
|
-
# (Although RFC 8305 strictly specifies sorting addresses,
|
95
|
-
# this method only alternates between IPv6 / IPv4 addresses due to the
|
96
|
-
# performance concerns)
|
97
|
-
# 4. Once a connection is established, all remaining connection attempts are
|
98
|
-
# canceled.
|
99
|
-
#
|
100
78
|
def initialize: (String remote_host, Integer remote_port, ?String local_host, ?Integer local_port) -> untyped
|
101
79
|
end
|
data/stdlib/tmpdir/0/tmpdir.rbs
CHANGED
@@ -64,6 +64,6 @@ class Dir
|
|
64
64
|
# FileUtils.remove_entry dir
|
65
65
|
# end
|
66
66
|
#
|
67
|
-
def self.mktmpdir: (?
|
68
|
-
| [X] (?
|
67
|
+
def self.mktmpdir: (?string | [ string, string ] | nil, ?path?, ?max_try: Integer?) -> String
|
68
|
+
| [X] (?string | [string, string ] | nil, ?path?, ?max_try: Integer?) { (String) -> X } -> X
|
69
69
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.1
|
5
5
|
platform: ruby
|
6
|
-
original_platform: ''
|
7
6
|
authors:
|
8
7
|
- Soutaro Matsumoto
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
10
|
+
date: 2024-12-27 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: logger
|
@@ -541,7 +540,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
541
540
|
- !ruby/object:Gem::Version
|
542
541
|
version: '0'
|
543
542
|
requirements: []
|
544
|
-
rubygems_version: 3.6.
|
543
|
+
rubygems_version: 3.6.2
|
545
544
|
specification_version: 4
|
546
545
|
summary: Type signature for Ruby.
|
547
546
|
test_files: []
|