rbs 3.4.4 → 3.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +12 -4
- data/.github/workflows/dependabot.yml +26 -0
- data/.github/workflows/ruby.yml +14 -1
- data/CHANGELOG.md +87 -1
- data/README.md +5 -3
- data/Rakefile +20 -3
- data/Steepfile +1 -1
- data/core/enumerator.rbs +1 -1
- data/core/float.rbs +2 -1
- data/core/gc.rbs +272 -150
- data/core/integer.rbs +6 -4
- 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/proc.rbs +1 -1
- data/core/range.rbs +2 -2
- data/core/rational.rbs +2 -1
- data/core/regexp.rbs +101 -90
- data/core/ruby_vm.rbs +107 -103
- data/core/rubygems/rubygems.rbs +1 -1
- data/core/set.rbs +13 -7
- 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/gem.md +0 -1
- 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/lexer.c +1338 -1341
- data/ext/rbs_extension/lexer.h +2 -0
- data/ext/rbs_extension/lexer.re +2 -3
- data/ext/rbs_extension/lexstate.c +5 -1
- data/ext/rbs_extension/location.c +80 -70
- data/ext/rbs_extension/location.h +25 -5
- data/ext/rbs_extension/parser.c +149 -43
- data/ext/rbs_extension/parserstate.c +12 -1
- data/ext/rbs_extension/parserstate.h +9 -0
- data/ext/rbs_extension/ruby_objs.c +13 -3
- data/ext/rbs_extension/ruby_objs.h +1 -0
- data/lib/rbs/cli/validate.rb +2 -2
- data/lib/rbs/cli.rb +4 -6
- 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/location_aux.rb +6 -1
- data/lib/rbs/parser/lex_result.rb +15 -0
- data/lib/rbs/parser/token.rb +23 -0
- data/lib/rbs/parser_aux.rb +12 -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 +7 -2
- data/sig/environment_loader.rbs +1 -1
- data/sig/errors.rbs +1 -1
- data/sig/manifest.yaml +0 -1
- data/sig/method_types.rbs +3 -3
- data/sig/parser.rbs +28 -0
- 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
- data/stdlib/uri/0/mailto.rbs +84 -0
- metadata +7 -9
- data/Gemfile +0 -30
- data/Gemfile.lock +0 -117
- 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
@@ -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
|
data/stdlib/uri/0/mailto.rbs
CHANGED
@@ -4,5 +4,89 @@ module URI
|
|
4
4
|
# RFC6068, the mailto URL scheme.
|
5
5
|
#
|
6
6
|
class MailTo < Generic
|
7
|
+
EMAIL_REGEXP: Regexp
|
8
|
+
|
9
|
+
# <!--
|
10
|
+
# rdoc-file=lib/uri/mailto.rb
|
11
|
+
# - build(args)
|
12
|
+
# -->
|
13
|
+
# ## Description
|
14
|
+
#
|
15
|
+
# Creates a new URI::MailTo object from components, with syntax checking.
|
16
|
+
#
|
17
|
+
# Components can be provided as an Array or Hash. If an Array is used, the
|
18
|
+
# components must be supplied as `[to, headers]`.
|
19
|
+
#
|
20
|
+
# If a Hash is used, the keys are the component names preceded by colons.
|
21
|
+
#
|
22
|
+
# The headers can be supplied as a pre-encoded string, such as
|
23
|
+
# `"subject=subscribe&cc=address"`, or as an Array of Arrays like `[['subject',
|
24
|
+
# 'subscribe'], ['cc', 'address']]`.
|
25
|
+
#
|
26
|
+
# Examples:
|
27
|
+
#
|
28
|
+
# require 'uri'
|
29
|
+
#
|
30
|
+
# m1 = URI::MailTo.build(['joe@example.com', 'subject=Ruby'])
|
31
|
+
# m1.to_s # => "mailto:joe@example.com?subject=Ruby"
|
32
|
+
#
|
33
|
+
# m2 = URI::MailTo.build(['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]])
|
34
|
+
# m2.to_s # => "mailto:john@example.com?Subject=Ruby&Cc=jack@example.com"
|
35
|
+
#
|
36
|
+
# m3 = URI::MailTo.build({:to => 'listman@example.com', :headers => [['subject', 'subscribe']]})
|
37
|
+
# m3.to_s # => "mailto:listman@example.com?subject=subscribe"
|
38
|
+
#
|
39
|
+
def self.build: (Array[String]) -> instance
|
40
|
+
| ([String, Array[Array[String]]]) -> instance
|
41
|
+
| (Hash[Symbol, String | Array[Array[String]]]) -> instance
|
42
|
+
|
43
|
+
# <!-- rdoc-file=lib/uri/mailto.rb -->
|
44
|
+
# E-mail headers set by the URL, as an Array of Arrays.
|
45
|
+
#
|
46
|
+
def headers: () -> Array[[String, String]]
|
47
|
+
|
48
|
+
# <!--
|
49
|
+
# rdoc-file=lib/uri/mailto.rb
|
50
|
+
# - headers=(v)
|
51
|
+
# -->
|
52
|
+
# Setter for headers `v`.
|
53
|
+
#
|
54
|
+
def headers=: (String) -> String
|
55
|
+
|
56
|
+
# <!-- rdoc-file=lib/uri/mailto.rb -->
|
57
|
+
# The primary e-mail address of the URL, as a String.
|
58
|
+
#
|
59
|
+
def to: () -> String
|
60
|
+
|
61
|
+
# <!--
|
62
|
+
# rdoc-file=lib/uri/mailto.rb
|
63
|
+
# - to=(v)
|
64
|
+
# -->
|
65
|
+
# Setter for to `v`.
|
66
|
+
#
|
67
|
+
def to=: (String) -> String
|
68
|
+
|
69
|
+
# <!--
|
70
|
+
# rdoc-file=lib/uri/mailto.rb
|
71
|
+
# - to_mailtext()
|
72
|
+
# -->
|
73
|
+
# Returns the RFC822 e-mail text equivalent of the URL, as a String.
|
74
|
+
#
|
75
|
+
# Example:
|
76
|
+
#
|
77
|
+
# require 'uri'
|
78
|
+
#
|
79
|
+
# uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr")
|
80
|
+
# uri.to_mailtext
|
81
|
+
# # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n"
|
82
|
+
#
|
83
|
+
def to_mailtext: () -> String
|
84
|
+
|
85
|
+
# <!--
|
86
|
+
# rdoc-file=lib/uri/mailto.rb
|
87
|
+
# - to_rfc822text()
|
88
|
+
# -->
|
89
|
+
#
|
90
|
+
def to_rfc822text: () -> String
|
7
91
|
end
|
8
92
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.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-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: logger
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -36,6 +36,7 @@ extra_rdoc_files: []
|
|
36
36
|
files:
|
37
37
|
- ".github/dependabot.yml"
|
38
38
|
- ".github/workflows/comments.yml"
|
39
|
+
- ".github/workflows/dependabot.yml"
|
39
40
|
- ".github/workflows/ruby.yml"
|
40
41
|
- ".github/workflows/typecheck.yml"
|
41
42
|
- ".gitignore"
|
@@ -43,8 +44,6 @@ files:
|
|
43
44
|
- BSDL
|
44
45
|
- CHANGELOG.md
|
45
46
|
- COPYING
|
46
|
-
- Gemfile
|
47
|
-
- Gemfile.lock
|
48
47
|
- README.md
|
49
48
|
- Rakefile
|
50
49
|
- Steepfile
|
@@ -132,6 +131,7 @@ files:
|
|
132
131
|
- core/unbound_method.rbs
|
133
132
|
- core/warning.rbs
|
134
133
|
- docs/CONTRIBUTING.md
|
134
|
+
- docs/architecture.md
|
135
135
|
- docs/collection.md
|
136
136
|
- docs/data_and_struct.md
|
137
137
|
- docs/gem.md
|
@@ -209,11 +209,9 @@ files:
|
|
209
209
|
- lib/rbs/locator.rb
|
210
210
|
- lib/rbs/method_type.rb
|
211
211
|
- lib/rbs/namespace.rb
|
212
|
+
- lib/rbs/parser/lex_result.rb
|
213
|
+
- lib/rbs/parser/token.rb
|
212
214
|
- 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
215
|
- lib/rbs/prototype/helpers.rb
|
218
216
|
- lib/rbs/prototype/node_usage.rb
|
219
217
|
- lib/rbs/prototype/rb.rb
|
data/Gemfile
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in rbs.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
# Development dependencies
|
7
|
-
gem "rake"
|
8
|
-
gem "rake-compiler"
|
9
|
-
gem "test-unit"
|
10
|
-
gem "rspec"
|
11
|
-
gem "rubocop"
|
12
|
-
gem "rubocop-rubycw"
|
13
|
-
gem "json"
|
14
|
-
gem "json-schema"
|
15
|
-
gem 'stackprof'
|
16
|
-
gem "goodcheck"
|
17
|
-
gem "dbm"
|
18
|
-
gem 'digest'
|
19
|
-
gem 'tempfile'
|
20
|
-
gem "rdoc"
|
21
|
-
|
22
|
-
# Test gems
|
23
|
-
gem "rbs-amber", path: "test/assets/test-gem"
|
24
|
-
|
25
|
-
# Bundled gems
|
26
|
-
gem "net-smtp"
|
27
|
-
|
28
|
-
group :minitest do
|
29
|
-
gem "minitest"
|
30
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,117 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
rbs (3.4.4)
|
5
|
-
abbrev
|
6
|
-
|
7
|
-
PATH
|
8
|
-
remote: test/assets/test-gem
|
9
|
-
specs:
|
10
|
-
rbs-amber (1.0.0)
|
11
|
-
|
12
|
-
GEM
|
13
|
-
remote: https://rubygems.org/
|
14
|
-
specs:
|
15
|
-
abbrev (0.1.2)
|
16
|
-
addressable (2.8.5)
|
17
|
-
public_suffix (>= 2.0.2, < 6.0)
|
18
|
-
ast (2.4.2)
|
19
|
-
dbm (1.1.0)
|
20
|
-
diff-lcs (1.5.0)
|
21
|
-
digest (3.1.1)
|
22
|
-
goodcheck (3.1.0)
|
23
|
-
marcel (>= 1.0, < 2.0)
|
24
|
-
psych (>= 3.1, < 5.0)
|
25
|
-
rainbow (>= 3.0, < 4.0)
|
26
|
-
strong_json (>= 1.1, < 2.2)
|
27
|
-
json (2.7.1)
|
28
|
-
json-schema (4.1.1)
|
29
|
-
addressable (>= 2.8)
|
30
|
-
language_server-protocol (3.17.0.3)
|
31
|
-
marcel (1.0.2)
|
32
|
-
minitest (5.20.0)
|
33
|
-
net-protocol (0.2.1)
|
34
|
-
timeout
|
35
|
-
net-smtp (0.4.0)
|
36
|
-
net-protocol
|
37
|
-
parallel (1.23.0)
|
38
|
-
parser (3.2.2.4)
|
39
|
-
ast (~> 2.4.1)
|
40
|
-
racc
|
41
|
-
power_assert (2.0.3)
|
42
|
-
psych (4.0.6)
|
43
|
-
stringio
|
44
|
-
public_suffix (5.0.3)
|
45
|
-
racc (1.7.3)
|
46
|
-
rainbow (3.1.1)
|
47
|
-
rake (13.1.0)
|
48
|
-
rake-compiler (1.2.5)
|
49
|
-
rake
|
50
|
-
rdoc (6.6.2)
|
51
|
-
psych (>= 4.0.0)
|
52
|
-
regexp_parser (2.8.3)
|
53
|
-
rexml (3.2.6)
|
54
|
-
rspec (3.12.0)
|
55
|
-
rspec-core (~> 3.12.0)
|
56
|
-
rspec-expectations (~> 3.12.0)
|
57
|
-
rspec-mocks (~> 3.12.0)
|
58
|
-
rspec-core (3.12.0)
|
59
|
-
rspec-support (~> 3.12.0)
|
60
|
-
rspec-expectations (3.12.0)
|
61
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
-
rspec-support (~> 3.12.0)
|
63
|
-
rspec-mocks (3.12.0)
|
64
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
-
rspec-support (~> 3.12.0)
|
66
|
-
rspec-support (3.12.0)
|
67
|
-
rubocop (1.59.0)
|
68
|
-
json (~> 2.3)
|
69
|
-
language_server-protocol (>= 3.17.0)
|
70
|
-
parallel (~> 1.10)
|
71
|
-
parser (>= 3.2.2.4)
|
72
|
-
rainbow (>= 2.2.2, < 4.0)
|
73
|
-
regexp_parser (>= 1.8, < 3.0)
|
74
|
-
rexml (>= 3.2.5, < 4.0)
|
75
|
-
rubocop-ast (>= 1.30.0, < 2.0)
|
76
|
-
ruby-progressbar (~> 1.7)
|
77
|
-
unicode-display_width (>= 2.4.0, < 3.0)
|
78
|
-
rubocop-ast (1.30.0)
|
79
|
-
parser (>= 3.2.1.0)
|
80
|
-
rubocop-rubycw (0.1.6)
|
81
|
-
rubocop (~> 1.0)
|
82
|
-
ruby-progressbar (1.13.0)
|
83
|
-
stackprof (0.2.25)
|
84
|
-
stringio (3.1.0)
|
85
|
-
strong_json (2.1.2)
|
86
|
-
tempfile (0.2.1)
|
87
|
-
test-unit (3.6.1)
|
88
|
-
power_assert
|
89
|
-
timeout (0.4.0)
|
90
|
-
unicode-display_width (2.5.0)
|
91
|
-
|
92
|
-
PLATFORMS
|
93
|
-
ruby
|
94
|
-
x86_64-darwin-20
|
95
|
-
|
96
|
-
DEPENDENCIES
|
97
|
-
dbm
|
98
|
-
digest
|
99
|
-
goodcheck
|
100
|
-
json
|
101
|
-
json-schema
|
102
|
-
minitest
|
103
|
-
net-smtp
|
104
|
-
rake
|
105
|
-
rake-compiler
|
106
|
-
rbs!
|
107
|
-
rbs-amber!
|
108
|
-
rdoc
|
109
|
-
rspec
|
110
|
-
rubocop
|
111
|
-
rubocop-rubycw
|
112
|
-
stackprof
|
113
|
-
tempfile
|
114
|
-
test-unit
|
115
|
-
|
116
|
-
BUNDLED WITH
|
117
|
-
2.4.18
|