rbs 3.4.4 → 3.5.0.pre.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/ruby.yml +7 -0
- data/CHANGELOG.md +0 -26
- data/Gemfile +12 -1
- data/Gemfile.lock +51 -34
- data/README.md +2 -1
- data/Rakefile +2 -2
- data/core/enumerator.rbs +1 -1
- data/core/gc.rbs +272 -150
- data/core/integer.rbs +4 -3
- data/core/io/wait.rbs +4 -4
- data/core/io.rbs +10 -3
- data/core/kernel.rbs +8 -7
- data/core/module.rbs +17 -4
- data/core/range.rbs +2 -2
- data/core/regexp.rbs +101 -90
- data/core/ruby_vm.rbs +103 -103
- data/core/string.rbs +3 -3
- data/core/symbol.rbs +2 -1
- data/core/thread.rbs +1 -1
- data/core/time.rbs +24 -4
- data/docs/architecture.md +110 -0
- data/docs/syntax.md +5 -1
- data/ext/rbs_extension/constants.c +2 -0
- data/ext/rbs_extension/constants.h +1 -0
- data/ext/rbs_extension/location.c +79 -70
- data/ext/rbs_extension/location.h +23 -5
- data/ext/rbs_extension/parser.c +82 -24
- data/ext/rbs_extension/parserstate.c +4 -0
- data/ext/rbs_extension/ruby_objs.c +13 -3
- data/ext/rbs_extension/ruby_objs.h +1 -0
- data/lib/rbs/collection/config.rb +1 -1
- data/lib/rbs/collection/sources/git.rb +1 -6
- data/lib/rbs/definition_builder/method_builder.rb +1 -1
- data/lib/rbs/definition_builder.rb +8 -8
- data/lib/rbs/diff.rb +1 -1
- data/lib/rbs/environment_loader.rb +2 -1
- data/lib/rbs/errors.rb +0 -14
- data/lib/rbs/parser_aux.rb +0 -5
- data/lib/rbs/prototype/helpers.rb +22 -12
- data/lib/rbs/prototype/rb.rb +38 -4
- data/lib/rbs/prototype/rbi.rb +30 -20
- data/lib/rbs/test/errors.rb +19 -14
- data/lib/rbs/test/tester.rb +1 -1
- data/lib/rbs/test/type_check.rb +95 -16
- data/lib/rbs/types.rb +112 -13
- data/lib/rbs/unit_test/spy.rb +1 -1
- data/lib/rbs/version.rb +1 -1
- data/rbs.gemspec +1 -1
- data/sig/environment_loader.rbs +1 -1
- data/sig/errors.rbs +1 -1
- data/sig/method_types.rbs +3 -3
- data/sig/prototype/helpers.rbs +4 -0
- data/sig/prototype/rbi.rbs +2 -0
- data/sig/types.rbs +54 -4
- data/sig/variance_calculator.rbs +2 -2
- data/stdlib/csv/0/csv.rbs +4 -1
- data/stdlib/fileutils/0/fileutils.rbs +1 -1
- data/stdlib/net-http/0/net-http.rbs +29 -27
- data/stdlib/socket/0/socket.rbs +2 -2
- data/stdlib/timeout/0/timeout.rbs +6 -0
- data/stdlib/uri/0/generic.rbs +2 -2
- data/stdlib/uri/0/http.rbs +2 -2
- metadata +3 -6
- data/lib/rbs/parser_compat/lexer_error.rb +0 -6
- data/lib/rbs/parser_compat/located_value.rb +0 -7
- data/lib/rbs/parser_compat/semantics_error.rb +0 -6
- data/lib/rbs/parser_compat/syntax_error.rb +0 -6
data/sig/prototype/helpers.rbs
CHANGED
@@ -13,6 +13,10 @@ module RBS
|
|
13
13
|
|
14
14
|
def keyword_hash?: (node) -> bool
|
15
15
|
|
16
|
+
# Returns a symbol if the node is a symbol literal node
|
17
|
+
#
|
18
|
+
def symbol_literal_node?: (node) -> Symbol?
|
19
|
+
|
16
20
|
def args_from_node: (node?) -> Array[untyped]
|
17
21
|
|
18
22
|
def untyped: () -> Types::Bases::Any
|
data/sig/prototype/rbi.rbs
CHANGED
data/sig/types.rbs
CHANGED
@@ -301,11 +301,16 @@ module RBS
|
|
301
301
|
end
|
302
302
|
|
303
303
|
class Record
|
304
|
+
attr_reader all_fields: Hash[Symbol, [t, bool]]
|
305
|
+
|
304
306
|
attr_reader fields: Hash[Symbol, t]
|
305
307
|
|
308
|
+
attr_reader optional_fields: Hash[Symbol, t]
|
309
|
+
|
306
310
|
type loc = Location[bot, bot]
|
307
311
|
|
308
312
|
def initialize: (fields: Hash[Symbol, t], location: loc?) -> void
|
313
|
+
| (all_fields: Hash[Symbol, [t, bool]], location: loc?) -> void
|
309
314
|
|
310
315
|
include _TypeBase
|
311
316
|
|
@@ -443,13 +448,58 @@ module RBS
|
|
443
448
|
def with_nonreturn_void?: () -> bool
|
444
449
|
end
|
445
450
|
|
451
|
+
# Function type without type checking arguments
|
452
|
+
#
|
453
|
+
class UntypedFunction
|
454
|
+
attr_reader return_type: t
|
455
|
+
|
456
|
+
def initialize: (return_type: t) -> void
|
457
|
+
|
458
|
+
def free_variables: (?Set[Symbol]) -> Set[Symbol]
|
459
|
+
|
460
|
+
def map_type: { (t) -> t } -> UntypedFunction
|
461
|
+
| -> Enumerator[t, UntypedFunction]
|
462
|
+
|
463
|
+
def map_type_name: () { (TypeName, Location[untyped, untyped]?, t) -> TypeName } -> UntypedFunction
|
464
|
+
|
465
|
+
def each_type: () { (t) -> void } -> void
|
466
|
+
| -> Enumerator[t, void]
|
467
|
+
|
468
|
+
def each_param: () { (Function::Param) -> void } -> void
|
469
|
+
| -> Enumerator[Function::Param, void]
|
470
|
+
|
471
|
+
include _ToJson
|
472
|
+
|
473
|
+
def sub: (Substitution) -> UntypedFunction
|
474
|
+
|
475
|
+
def with_return_type: (t) -> UntypedFunction
|
476
|
+
|
477
|
+
def update: (?return_type: t) -> UntypedFunction
|
478
|
+
|
479
|
+
def empty?: () -> bool
|
480
|
+
|
481
|
+
def has_self_type?: () -> bool
|
482
|
+
|
483
|
+
def has_classish_type?: () -> bool
|
484
|
+
|
485
|
+
def with_nonreturn_void?: () -> bool
|
486
|
+
|
487
|
+
# Returns `?`
|
488
|
+
def param_to_s: () -> String
|
489
|
+
|
490
|
+
# Returns `return_type.to_s(1)`
|
491
|
+
def return_to_s: () -> String
|
492
|
+
end
|
493
|
+
|
494
|
+
type function = Types::Function | Types::UntypedFunction
|
495
|
+
|
446
496
|
class Block
|
447
|
-
attr_reader type:
|
497
|
+
attr_reader type: function
|
448
498
|
attr_reader required: bool
|
449
499
|
|
450
500
|
attr_reader self_type: t?
|
451
501
|
|
452
|
-
def initialize: (type:
|
502
|
+
def initialize: (type: function, ?self_type: t?, required: boolish) -> void
|
453
503
|
|
454
504
|
def ==: (untyped other) -> bool
|
455
505
|
|
@@ -465,14 +515,14 @@ module RBS
|
|
465
515
|
end
|
466
516
|
|
467
517
|
class Proc
|
468
|
-
attr_reader type:
|
518
|
+
attr_reader type: function
|
469
519
|
attr_reader block: Block?
|
470
520
|
|
471
521
|
attr_reader self_type: t?
|
472
522
|
|
473
523
|
type loc = Location[bot, bot]
|
474
524
|
|
475
|
-
def initialize: (location: loc?, type:
|
525
|
+
def initialize: (location: loc?, type: function, ?self_type: t?, block: Block?) -> void
|
476
526
|
|
477
527
|
include _TypeBase
|
478
528
|
|
data/sig/variance_calculator.rbs
CHANGED
@@ -73,14 +73,14 @@ module RBS
|
|
73
73
|
def in_inherit: (name: TypeName, args: Array[Types::t], variables: Array[Symbol]) -> Result
|
74
74
|
|
75
75
|
# The type name must be normalized
|
76
|
-
#
|
76
|
+
#
|
77
77
|
def in_type_alias: (name: TypeName) -> Result
|
78
78
|
|
79
79
|
private
|
80
80
|
|
81
81
|
def type: (Types::t, result: Result, context: variance) -> void
|
82
82
|
|
83
|
-
def function: (Types::
|
83
|
+
def function: (Types::function, result: Result, context: variance) -> void
|
84
84
|
|
85
85
|
def negate: (variance) -> variance
|
86
86
|
end
|
data/stdlib/csv/0/csv.rbs
CHANGED
@@ -1722,7 +1722,10 @@ class CSV < Object
|
|
1722
1722
|
# would read `UTF-32BE` data from the file but transcode it to `UTF-8`
|
1723
1723
|
# before parsing.
|
1724
1724
|
#
|
1725
|
-
def self.foreach:
|
1725
|
+
def self.foreach: (String | IO path, ?String mode, headers: true, **untyped options) { (::CSV::Row arg0) -> void } -> void
|
1726
|
+
| (String | IO path, ?String mode, headers: true, **untyped options) -> Enumerator[::CSV::Row, void]
|
1727
|
+
| (String | IO path, ?String mode, **untyped options) { (::Array[String?] arg0) -> void } -> void
|
1728
|
+
| (String | IO path, ?String mode, **untyped options) -> Enumerator[::Array[String?], void]
|
1726
1729
|
|
1727
1730
|
# <!--
|
1728
1731
|
# rdoc-file=lib/csv.rb
|
@@ -1,4 +1,6 @@
|
|
1
1
|
module Net
|
2
|
+
type headers = Hash[String | Symbol, untyped]
|
3
|
+
|
2
4
|
class HTTPBadResponse < StandardError
|
3
5
|
end
|
4
6
|
|
@@ -775,7 +777,7 @@ module Net
|
|
775
777
|
# -->
|
776
778
|
# Like Net::HTTP.get, but writes the returned body to $stdout; returns `nil`.
|
777
779
|
#
|
778
|
-
def self.get_print: (URI::Generic uri, ?
|
780
|
+
def self.get_print: (URI::Generic uri, ?headers header) -> void
|
779
781
|
| (String host, String path, ?Integer port) -> void
|
780
782
|
|
781
783
|
# <!--
|
@@ -811,7 +813,7 @@ module Net
|
|
811
813
|
# * Net::HTTP::Get: request class for HTTP method `GET`.
|
812
814
|
# * Net::HTTP#get: convenience method for HTTP method `GET`.
|
813
815
|
#
|
814
|
-
def self.get: (URI::Generic uri, ?
|
816
|
+
def self.get: (URI::Generic uri, ?headers header) -> String
|
815
817
|
| (String host, String path, ?Integer port) -> String
|
816
818
|
|
817
819
|
# <!--
|
@@ -822,7 +824,7 @@ module Net
|
|
822
824
|
# Like Net::HTTP.get, but returns a Net::HTTPResponse object instead of the body
|
823
825
|
# string.
|
824
826
|
#
|
825
|
-
def self.get_response: (URI::Generic uri, ?
|
827
|
+
def self.get_response: (URI::Generic uri, ?headers header) ?{ (Net::HTTPResponse) -> void } -> Net::HTTPResponse
|
826
828
|
| (String host, String path, ?Integer port) -> Net::HTTPResponse
|
827
829
|
|
828
830
|
# <!--
|
@@ -854,7 +856,7 @@ module Net
|
|
854
856
|
# * Net::HTTP::Post: request class for HTTP method `POST`.
|
855
857
|
# * Net::HTTP#post: convenience method for HTTP method `POST`.
|
856
858
|
#
|
857
|
-
def self.post: (URI::Generic url, String data, ?
|
859
|
+
def self.post: (URI::Generic url, String data, ?headers header) -> Net::HTTPResponse
|
858
860
|
|
859
861
|
# <!--
|
860
862
|
# rdoc-file=lib/net/http.rb
|
@@ -1613,7 +1615,7 @@ module Net
|
|
1613
1615
|
# * Net::HTTP::Get: request class for HTTP method GET.
|
1614
1616
|
# * Net::HTTP.get: sends GET request, returns response body.
|
1615
1617
|
#
|
1616
|
-
def get: (String path, ?
|
1618
|
+
def get: (String path, ?headers initheader, ?bot dest) ?{ (String body_segment) -> void } -> Net::HTTPResponse
|
1617
1619
|
|
1618
1620
|
# <!--
|
1619
1621
|
# rdoc-file=lib/net/http.rb
|
@@ -1633,7 +1635,7 @@ module Net
|
|
1633
1635
|
# ["content-type", ["application/json; charset=utf-8"]],
|
1634
1636
|
# ["connection", ["close"]]]
|
1635
1637
|
#
|
1636
|
-
def head: (String path, ?
|
1638
|
+
def head: (String path, ?headers initheader) -> Net::HTTPResponse
|
1637
1639
|
|
1638
1640
|
# <!--
|
1639
1641
|
# rdoc-file=lib/net/http.rb
|
@@ -1666,7 +1668,7 @@ module Net
|
|
1666
1668
|
# * Net::HTTP::Post: request class for HTTP method POST.
|
1667
1669
|
# * Net::HTTP.post: sends POST request, returns response body.
|
1668
1670
|
#
|
1669
|
-
def post: (String path, String data, ?
|
1671
|
+
def post: (String path, String data, ?headers initheader, ?bot dest) ?{ (String body_segment) -> void } -> Net::HTTPResponse
|
1670
1672
|
|
1671
1673
|
# <!--
|
1672
1674
|
# rdoc-file=lib/net/http.rb
|
@@ -1694,7 +1696,7 @@ module Net
|
|
1694
1696
|
#
|
1695
1697
|
# http.patch('/todos/1', data) # => #<Net::HTTPCreated 201 Created readbody=true>
|
1696
1698
|
#
|
1697
|
-
def patch: (String path, String data, ?
|
1699
|
+
def patch: (String path, String data, ?headers initheader, ?bot dest) ?{ (String body_segment) -> void } -> Net::HTTPResponse
|
1698
1700
|
|
1699
1701
|
# <!--
|
1700
1702
|
# rdoc-file=lib/net/http.rb
|
@@ -1710,7 +1712,7 @@ module Net
|
|
1710
1712
|
# http = Net::HTTP.new(hostname)
|
1711
1713
|
# http.put('/todos/1', data) # => #<Net::HTTPOK 200 OK readbody=true>
|
1712
1714
|
#
|
1713
|
-
def put: (String path, String data, ?
|
1715
|
+
def put: (String path, String data, ?headers initheader) -> Net::HTTPResponse
|
1714
1716
|
|
1715
1717
|
# <!--
|
1716
1718
|
# rdoc-file=lib/net/http.rb
|
@@ -1726,7 +1728,7 @@ module Net
|
|
1726
1728
|
# http = Net::HTTP.new(hostname)
|
1727
1729
|
# http.proppatch('/todos/1', data)
|
1728
1730
|
#
|
1729
|
-
def proppatch: (String path, String body, ?
|
1731
|
+
def proppatch: (String path, String body, ?headers initheader) -> Net::HTTPResponse
|
1730
1732
|
|
1731
1733
|
# <!--
|
1732
1734
|
# rdoc-file=lib/net/http.rb
|
@@ -1742,7 +1744,7 @@ module Net
|
|
1742
1744
|
# http = Net::HTTP.new(hostname)
|
1743
1745
|
# http.lock('/todos/1', data)
|
1744
1746
|
#
|
1745
|
-
def lock: (String path, String body, ?
|
1747
|
+
def lock: (String path, String body, ?headers initheader) -> Net::HTTPResponse
|
1746
1748
|
|
1747
1749
|
# <!--
|
1748
1750
|
# rdoc-file=lib/net/http.rb
|
@@ -1758,7 +1760,7 @@ module Net
|
|
1758
1760
|
# http = Net::HTTP.new(hostname)
|
1759
1761
|
# http.unlock('/todos/1', data)
|
1760
1762
|
#
|
1761
|
-
def unlock: (String path, String body, ?
|
1763
|
+
def unlock: (String path, String body, ?headers initheader) -> Net::HTTPResponse
|
1762
1764
|
|
1763
1765
|
# <!--
|
1764
1766
|
# rdoc-file=lib/net/http.rb
|
@@ -1773,7 +1775,7 @@ module Net
|
|
1773
1775
|
# http = Net::HTTP.new(hostname)
|
1774
1776
|
# http.options('/')
|
1775
1777
|
#
|
1776
|
-
def options: (String path, ?
|
1778
|
+
def options: (String path, ?headers initheader) -> Net::HTTPResponse
|
1777
1779
|
|
1778
1780
|
# <!--
|
1779
1781
|
# rdoc-file=lib/net/http.rb
|
@@ -1789,7 +1791,7 @@ module Net
|
|
1789
1791
|
# http = Net::HTTP.new(hostname)
|
1790
1792
|
# http.propfind('/todos/1', data)
|
1791
1793
|
#
|
1792
|
-
def propfind: (String path, ?untyped? body, ?
|
1794
|
+
def propfind: (String path, ?untyped? body, ?headers initheader) -> Net::HTTPResponse
|
1793
1795
|
|
1794
1796
|
# <!--
|
1795
1797
|
# rdoc-file=lib/net/http.rb
|
@@ -1804,7 +1806,7 @@ module Net
|
|
1804
1806
|
# http = Net::HTTP.new(hostname)
|
1805
1807
|
# http.delete('/todos/1')
|
1806
1808
|
#
|
1807
|
-
def delete: (String path, ?
|
1809
|
+
def delete: (String path, ?headers initheader) -> Net::HTTPResponse
|
1808
1810
|
|
1809
1811
|
# <!--
|
1810
1812
|
# rdoc-file=lib/net/http.rb
|
@@ -1819,7 +1821,7 @@ module Net
|
|
1819
1821
|
# http = Net::HTTP.new(hostname)
|
1820
1822
|
# http.move('/todos/1')
|
1821
1823
|
#
|
1822
|
-
def move: (String path, ?
|
1824
|
+
def move: (String path, ?headers initheader) -> Net::HTTPResponse
|
1823
1825
|
|
1824
1826
|
# <!--
|
1825
1827
|
# rdoc-file=lib/net/http.rb
|
@@ -1834,7 +1836,7 @@ module Net
|
|
1834
1836
|
# http = Net::HTTP.new(hostname)
|
1835
1837
|
# http.copy('/todos/1')
|
1836
1838
|
#
|
1837
|
-
def copy: (String path, ?
|
1839
|
+
def copy: (String path, ?headers initheader) -> Net::HTTPResponse
|
1838
1840
|
|
1839
1841
|
# <!--
|
1840
1842
|
# rdoc-file=lib/net/http.rb
|
@@ -1850,7 +1852,7 @@ module Net
|
|
1850
1852
|
# http.mkcol('/todos/1', data)
|
1851
1853
|
# http = Net::HTTP.new(hostname)
|
1852
1854
|
#
|
1853
|
-
def mkcol: (String path, ?untyped? body, ?
|
1855
|
+
def mkcol: (String path, ?untyped? body, ?headers initheader) -> Net::HTTPResponse
|
1854
1856
|
|
1855
1857
|
# <!--
|
1856
1858
|
# rdoc-file=lib/net/http.rb
|
@@ -1865,7 +1867,7 @@ module Net
|
|
1865
1867
|
# http = Net::HTTP.new(hostname)
|
1866
1868
|
# http.trace('/todos/1')
|
1867
1869
|
#
|
1868
|
-
def trace: (String path, ?
|
1870
|
+
def trace: (String path, ?headers initheader) -> Net::HTTPResponse
|
1869
1871
|
|
1870
1872
|
# <!--
|
1871
1873
|
# rdoc-file=lib/net/http.rb
|
@@ -1893,7 +1895,7 @@ module Net
|
|
1893
1895
|
#
|
1894
1896
|
# #<Net::HTTPOK 200 OK readbody=false>
|
1895
1897
|
#
|
1896
|
-
def request_get: (String path, ?
|
1898
|
+
def request_get: (String path, ?headers initheader) ?{ (Net::HTTPResponse response) -> void } -> Net::HTTPResponse
|
1897
1899
|
|
1898
1900
|
# <!--
|
1899
1901
|
# rdoc-file=lib/net/http.rb
|
@@ -1908,7 +1910,7 @@ module Net
|
|
1908
1910
|
# http = Net::HTTP.new(hostname)
|
1909
1911
|
# http.head('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
|
1910
1912
|
#
|
1911
|
-
def request_head: (String path, ?
|
1913
|
+
def request_head: (String path, ?headers initheader) ?{ (Net::HTTPResponse response) -> void } -> Net::HTTPResponse
|
1912
1914
|
|
1913
1915
|
# <!--
|
1914
1916
|
# rdoc-file=lib/net/http.rb
|
@@ -1937,9 +1939,9 @@ module Net
|
|
1937
1939
|
#
|
1938
1940
|
# "{\n \"xyzzy\": \"\",\n \"id\": 201\n}"
|
1939
1941
|
#
|
1940
|
-
def request_post: (String path, String data, ?
|
1942
|
+
def request_post: (String path, String data, ?headers initheader) ?{ (Net::HTTPResponse response) -> void } -> Net::HTTPResponse
|
1941
1943
|
|
1942
|
-
def request_put: (String path, String data, ?
|
1944
|
+
def request_put: (String path, String data, ?headers initheader) ?{ (Net::HTTPResponse response) -> void } -> Net::HTTPResponse
|
1943
1945
|
|
1944
1946
|
# <!--
|
1945
1947
|
# rdoc-file=lib/net/http.rb
|
@@ -1987,7 +1989,7 @@ module Net
|
|
1987
1989
|
# http.send_request('POST', '/todos', 'xyzzy')
|
1988
1990
|
# # => #<Net::HTTPCreated 201 Created readbody=true>
|
1989
1991
|
#
|
1990
|
-
def send_request: (String name, String path, ?String? data, ?
|
1992
|
+
def send_request: (String name, String path, ?String? data, ?headers? header) -> Net::HTTPResponse
|
1991
1993
|
|
1992
1994
|
# <!--
|
1993
1995
|
# rdoc-file=lib/net/http.rb
|
@@ -2076,7 +2078,7 @@ module Net
|
|
2076
2078
|
# - new(m, reqbody, resbody, uri_or_path, initheader = nil)
|
2077
2079
|
# -->
|
2078
2080
|
#
|
2079
|
-
def initialize: (String m, boolish reqbody, boolish resbody, URI::Generic | String uri_or_path, ?
|
2081
|
+
def initialize: (String m, boolish reqbody, boolish resbody, URI::Generic | String uri_or_path, ?headers initheader) -> Net::HTTP
|
2080
2082
|
|
2081
2083
|
# <!-- rdoc-file=lib/net/http/generic_request.rb -->
|
2082
2084
|
# Returns the string method name for the request:
|
@@ -3288,8 +3290,8 @@ module Net
|
|
3288
3290
|
# to enable compression of the response body unless Accept-Encoding or Range are
|
3289
3291
|
# supplied in `initheader`.
|
3290
3292
|
#
|
3291
|
-
def initialize: (String path, ?
|
3292
|
-
| (URI::Generic uri, ?
|
3293
|
+
def initialize: (String path, ?headers initheader) -> void
|
3294
|
+
| (URI::Generic uri, ?headers initheader) -> void
|
3293
3295
|
end
|
3294
3296
|
|
3295
3297
|
# <!-- rdoc-file=lib/net/http/requests.rb -->
|
data/stdlib/socket/0/socket.rbs
CHANGED
@@ -482,8 +482,8 @@ class Socket < BasicSocket
|
|
482
482
|
# puts sock.read
|
483
483
|
# }
|
484
484
|
#
|
485
|
-
def self.tcp: (String host, Integer port, ?String local_host, ?Integer local_port, ?resolv_timeout:
|
486
|
-
| (String host, Integer port, ?String local_host, ?Integer local_port, ?resolv_timeout:
|
485
|
+
def self.tcp: (String host, Integer port, ?String local_host, ?Integer local_port, ?resolv_timeout: Time::_Timeout, ?connect_timeout: Time::_Timeout) -> instance
|
486
|
+
| (String host, Integer port, ?String local_host, ?Integer local_port, ?resolv_timeout: Time::_Timeout, ?connect_timeout: Time::_Timeout) { (instance) -> void } -> void
|
487
487
|
|
488
488
|
# <!--
|
489
489
|
# rdoc-file=ext/socket/lib/socket.rb
|
@@ -62,6 +62,12 @@ module Timeout
|
|
62
62
|
def self?.timeout: [T] (Numeric? sec, ?singleton(Exception) klass, ?String message) { (Numeric sec) -> T } -> T
|
63
63
|
end
|
64
64
|
|
65
|
+
# <!-- rdoc-file=lib/timeout.rb -->
|
66
|
+
# Internal error raised to when a timeout is triggered.
|
67
|
+
#
|
68
|
+
class Timeout::ExitException < Exception
|
69
|
+
end
|
70
|
+
|
65
71
|
# <!-- rdoc-file=lib/timeout.rb -->
|
66
72
|
# Raised by Timeout.timeout when the block times out.
|
67
73
|
#
|
data/stdlib/uri/0/generic.rbs
CHANGED
@@ -154,7 +154,7 @@ module URI
|
|
154
154
|
# then it does URI::Escape.escape all URI components and tries again.
|
155
155
|
#
|
156
156
|
def self.build2: (Array[nil | String | Integer]) -> URI::Generic
|
157
|
-
| ({ scheme: String?, userinfo: String?, host: String?, port: Integer?, registry: String?, path: String?, opaque: String?, query: String?, fragment: String? }) ->
|
157
|
+
| ({ scheme: String?, userinfo: String?, host: String?, port: Integer?, registry: String?, path: String?, opaque: String?, query: String?, fragment: String? }) -> instance
|
158
158
|
|
159
159
|
# <!--
|
160
160
|
# rdoc-file=lib/uri/generic.rb
|
@@ -172,7 +172,7 @@ module URI
|
|
172
172
|
# See ::new for hash keys to use or for order of array items.
|
173
173
|
#
|
174
174
|
def self.build: (Array[nil | String | Integer]) -> URI::Generic
|
175
|
-
| ({ scheme: String?, userinfo: String?, host: String?, port: Integer?, registry: String?, path: String?, opaque: String?, query: String?, fragment: String? }) ->
|
175
|
+
| ({ scheme: String?, userinfo: String?, host: String?, port: Integer?, registry: String?, path: String?, opaque: String?, query: String?, fragment: String? }) -> instance
|
176
176
|
|
177
177
|
# <!--
|
178
178
|
# rdoc-file=lib/uri/generic.rb
|
data/stdlib/uri/0/http.rbs
CHANGED
@@ -45,8 +45,8 @@ module URI
|
|
45
45
|
# Currently, if passed userinfo components this method generates invalid HTTP
|
46
46
|
# URIs as per RFC 1738.
|
47
47
|
#
|
48
|
-
def self.build: (Array[String | Integer] args) ->
|
49
|
-
| ({ userinfo: String?, host: String?, port: Integer?, path: String?, query: String?, fragment: String? }) ->
|
48
|
+
def self.build: (Array[String | Integer] args) -> instance
|
49
|
+
| ({ userinfo: String?, host: String?, port: Integer?, path: String?, query: String?, fragment: String? }) -> instance
|
50
50
|
|
51
51
|
# <!--
|
52
52
|
# rdoc-file=lib/uri/http.rb
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: abbrev
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- core/unbound_method.rbs
|
133
133
|
- core/warning.rbs
|
134
134
|
- docs/CONTRIBUTING.md
|
135
|
+
- docs/architecture.md
|
135
136
|
- docs/collection.md
|
136
137
|
- docs/data_and_struct.md
|
137
138
|
- docs/gem.md
|
@@ -210,10 +211,6 @@ files:
|
|
210
211
|
- lib/rbs/method_type.rb
|
211
212
|
- lib/rbs/namespace.rb
|
212
213
|
- lib/rbs/parser_aux.rb
|
213
|
-
- lib/rbs/parser_compat/lexer_error.rb
|
214
|
-
- lib/rbs/parser_compat/located_value.rb
|
215
|
-
- lib/rbs/parser_compat/semantics_error.rb
|
216
|
-
- lib/rbs/parser_compat/syntax_error.rb
|
217
214
|
- lib/rbs/prototype/helpers.rb
|
218
215
|
- lib/rbs/prototype/node_usage.rb
|
219
216
|
- lib/rbs/prototype/rb.rb
|