rbs 3.4.4 → 3.5.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d531a807ca33dac823ab8abc9381ad2769607581f7f878c7e90b64f96a7df12c
|
4
|
+
data.tar.gz: f063ae7209b5eded9645c0429ddba1c70104d4866252eee234b4f58dad2f0090
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 361cee4e71bb3430d5f83e48923e44f3a542336b77b81ee6aa2188d5434f14d89569d204d866c8b688fc932803bd6fd5c6ad3a1c65db99536032d63f5b882443
|
7
|
+
data.tar.gz: 2c526b49e8db179a6137a2ab82d1205f11fd1b2346e630248f8cdd874d514c6647bff7cb5bfc9e224d5ea10ae3d90c2fff0cacd903b69f071b5930d3831eded3
|
data/.github/workflows/ruby.yml
CHANGED
@@ -14,6 +14,7 @@ jobs:
|
|
14
14
|
fail-fast: false
|
15
15
|
matrix:
|
16
16
|
ruby: ['3.0', '3.1', '3.2', '3.3', head]
|
17
|
+
rubyopt: [""]
|
17
18
|
job:
|
18
19
|
- test
|
19
20
|
include:
|
@@ -21,6 +22,12 @@ jobs:
|
|
21
22
|
job: stdlib_test rubocop
|
22
23
|
- ruby: "3.3"
|
23
24
|
job: stdlib_test
|
25
|
+
- ruby: "3.3"
|
26
|
+
job: test
|
27
|
+
rubyopt: "--enable-frozen-string-literal"
|
28
|
+
- ruby: "3.3"
|
29
|
+
job: stdlib_test
|
30
|
+
rubyopt: "--enable-frozen-string-literal"
|
24
31
|
- ruby: "3.3"
|
25
32
|
job: lexer compile confirm_lexer
|
26
33
|
- ruby: "3.3"
|
data/CHANGELOG.md
CHANGED
@@ -2,32 +2,6 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
-
## 3.4.4 (2024-02-08)
|
6
|
-
|
7
|
-
### Miscellaneous
|
8
|
-
|
9
|
-
* Backport [#1752](https://github.com/ruby/rbs/pull/1752) ([#1753](https://github.com/ruby/rbs/pull/1753))
|
10
|
-
|
11
|
-
## 3.4.3 (2024-01-25)
|
12
|
-
|
13
|
-
### Library changes
|
14
|
-
|
15
|
-
#### rbs collection
|
16
|
-
|
17
|
-
* Backport [#1731](https://github.com/ruby/rbs/pull/1731) ([#1735](https://github.com/ruby/rbs/pull/1735))
|
18
|
-
|
19
|
-
## 3.4.2 (2024-01-19)
|
20
|
-
|
21
|
-
### Miscellaneous
|
22
|
-
|
23
|
-
* Backport [#1724](https://github.com/ruby/rbs/pull/1724) ([#1726](https://github.com/ruby/rbs/pull/1726))
|
24
|
-
|
25
|
-
## 3.4.1 (2023-12-26)
|
26
|
-
|
27
|
-
### Signature updates
|
28
|
-
|
29
|
-
* Update embedded RDoc based on ruby-3.3.0 (Backport #1699) ([#1700](https://github.com/ruby/rbs/pull/1700))
|
30
|
-
|
31
5
|
## 3.4.0 (2023-12-21)
|
32
6
|
|
33
7
|
### Signature updates
|
data/Gemfile
CHANGED
@@ -12,18 +12,29 @@ gem "rubocop"
|
|
12
12
|
gem "rubocop-rubycw"
|
13
13
|
gem "json"
|
14
14
|
gem "json-schema"
|
15
|
-
gem 'stackprof'
|
16
15
|
gem "goodcheck"
|
17
16
|
gem "dbm"
|
18
17
|
gem 'digest'
|
19
18
|
gem 'tempfile'
|
20
19
|
gem "rdoc"
|
20
|
+
gem "bigdecimal"
|
21
|
+
gem "abbrev"
|
22
|
+
gem "base64"
|
23
|
+
gem "mutex_m"
|
24
|
+
gem "nkf"
|
25
|
+
gem "fileutils"
|
26
|
+
|
27
|
+
# Performance profiling and benchmarking
|
28
|
+
gem 'stackprof'
|
29
|
+
gem 'memory_profiler'
|
30
|
+
gem 'benchmark-ips'
|
21
31
|
|
22
32
|
# Test gems
|
23
33
|
gem "rbs-amber", path: "test/assets/test-gem"
|
24
34
|
|
25
35
|
# Bundled gems
|
26
36
|
gem "net-smtp"
|
37
|
+
gem 'csv'
|
27
38
|
|
28
39
|
group :minitest do
|
29
40
|
gem "minitest"
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rbs (3.
|
4
|
+
rbs (3.5.0.pre.1)
|
5
5
|
abbrev
|
6
6
|
|
7
7
|
PATH
|
@@ -13,80 +13,88 @@ GEM
|
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
15
|
abbrev (0.1.2)
|
16
|
-
addressable (2.8.
|
16
|
+
addressable (2.8.6)
|
17
17
|
public_suffix (>= 2.0.2, < 6.0)
|
18
18
|
ast (2.4.2)
|
19
|
+
base64 (0.2.0)
|
20
|
+
benchmark-ips (2.13.0)
|
21
|
+
bigdecimal (3.1.7)
|
22
|
+
csv (3.3.0)
|
19
23
|
dbm (1.1.0)
|
20
|
-
diff-lcs (1.5.
|
24
|
+
diff-lcs (1.5.1)
|
21
25
|
digest (3.1.1)
|
26
|
+
fileutils (1.7.2)
|
22
27
|
goodcheck (3.1.0)
|
23
28
|
marcel (>= 1.0, < 2.0)
|
24
29
|
psych (>= 3.1, < 5.0)
|
25
30
|
rainbow (>= 3.0, < 4.0)
|
26
31
|
strong_json (>= 1.1, < 2.2)
|
27
|
-
json (2.7.
|
28
|
-
json-schema (4.
|
32
|
+
json (2.7.2)
|
33
|
+
json-schema (4.3.0)
|
29
34
|
addressable (>= 2.8)
|
30
35
|
language_server-protocol (3.17.0.3)
|
31
36
|
marcel (1.0.2)
|
32
|
-
|
33
|
-
|
37
|
+
memory_profiler (1.0.1)
|
38
|
+
minitest (5.22.3)
|
39
|
+
mutex_m (0.2.0)
|
40
|
+
net-protocol (0.2.2)
|
34
41
|
timeout
|
35
|
-
net-smtp (0.
|
42
|
+
net-smtp (0.5.0)
|
36
43
|
net-protocol
|
37
|
-
|
38
|
-
|
44
|
+
nkf (0.2.0)
|
45
|
+
parallel (1.24.0)
|
46
|
+
parser (3.3.0.5)
|
39
47
|
ast (~> 2.4.1)
|
40
48
|
racc
|
41
49
|
power_assert (2.0.3)
|
42
50
|
psych (4.0.6)
|
43
51
|
stringio
|
44
|
-
public_suffix (5.0.
|
52
|
+
public_suffix (5.0.5)
|
45
53
|
racc (1.7.3)
|
46
54
|
rainbow (3.1.1)
|
47
|
-
rake (13.1
|
48
|
-
rake-compiler (1.2.
|
55
|
+
rake (13.2.1)
|
56
|
+
rake-compiler (1.2.7)
|
49
57
|
rake
|
50
|
-
rdoc (6.6.
|
58
|
+
rdoc (6.6.3.1)
|
51
59
|
psych (>= 4.0.0)
|
52
|
-
regexp_parser (2.
|
60
|
+
regexp_parser (2.9.0)
|
53
61
|
rexml (3.2.6)
|
54
|
-
rspec (3.
|
55
|
-
rspec-core (~> 3.
|
56
|
-
rspec-expectations (~> 3.
|
57
|
-
rspec-mocks (~> 3.
|
58
|
-
rspec-core (3.
|
59
|
-
rspec-support (~> 3.
|
60
|
-
rspec-expectations (3.
|
62
|
+
rspec (3.13.0)
|
63
|
+
rspec-core (~> 3.13.0)
|
64
|
+
rspec-expectations (~> 3.13.0)
|
65
|
+
rspec-mocks (~> 3.13.0)
|
66
|
+
rspec-core (3.13.0)
|
67
|
+
rspec-support (~> 3.13.0)
|
68
|
+
rspec-expectations (3.13.0)
|
61
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
-
rspec-support (~> 3.
|
63
|
-
rspec-mocks (3.
|
70
|
+
rspec-support (~> 3.13.0)
|
71
|
+
rspec-mocks (3.13.0)
|
64
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
-
rspec-support (~> 3.
|
66
|
-
rspec-support (3.
|
67
|
-
rubocop (1.
|
73
|
+
rspec-support (~> 3.13.0)
|
74
|
+
rspec-support (3.13.0)
|
75
|
+
rubocop (1.63.2)
|
68
76
|
json (~> 2.3)
|
69
77
|
language_server-protocol (>= 3.17.0)
|
70
78
|
parallel (~> 1.10)
|
71
|
-
parser (>= 3.
|
79
|
+
parser (>= 3.3.0.2)
|
72
80
|
rainbow (>= 2.2.2, < 4.0)
|
73
81
|
regexp_parser (>= 1.8, < 3.0)
|
74
82
|
rexml (>= 3.2.5, < 4.0)
|
75
|
-
rubocop-ast (>= 1.
|
83
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
76
84
|
ruby-progressbar (~> 1.7)
|
77
85
|
unicode-display_width (>= 2.4.0, < 3.0)
|
78
|
-
rubocop-ast (1.
|
79
|
-
parser (>= 3.
|
86
|
+
rubocop-ast (1.31.2)
|
87
|
+
parser (>= 3.3.0.4)
|
80
88
|
rubocop-rubycw (0.1.6)
|
81
89
|
rubocop (~> 1.0)
|
82
90
|
ruby-progressbar (1.13.0)
|
83
|
-
stackprof (0.2.
|
91
|
+
stackprof (0.2.26)
|
84
92
|
stringio (3.1.0)
|
85
93
|
strong_json (2.1.2)
|
86
94
|
tempfile (0.2.1)
|
87
|
-
test-unit (3.6.
|
95
|
+
test-unit (3.6.2)
|
88
96
|
power_assert
|
89
|
-
timeout (0.4.
|
97
|
+
timeout (0.4.1)
|
90
98
|
unicode-display_width (2.5.0)
|
91
99
|
|
92
100
|
PLATFORMS
|
@@ -94,13 +102,22 @@ PLATFORMS
|
|
94
102
|
x86_64-darwin-20
|
95
103
|
|
96
104
|
DEPENDENCIES
|
105
|
+
abbrev
|
106
|
+
base64
|
107
|
+
benchmark-ips
|
108
|
+
bigdecimal
|
109
|
+
csv
|
97
110
|
dbm
|
98
111
|
digest
|
112
|
+
fileutils
|
99
113
|
goodcheck
|
100
114
|
json
|
101
115
|
json-schema
|
116
|
+
memory_profiler
|
102
117
|
minitest
|
118
|
+
mutex_m
|
103
119
|
net-smtp
|
120
|
+
nkf
|
104
121
|
rake
|
105
122
|
rake-compiler
|
106
123
|
rbs!
|
data/README.md
CHANGED
@@ -118,7 +118,7 @@ end
|
|
118
118
|
It prints signatures for all methods, classes, instance variables, and constants.
|
119
119
|
This is only a starting point, and you should edit the output to match your signature more accurately.
|
120
120
|
|
121
|
-
`rbs
|
121
|
+
`rbs prototype` offers three options.
|
122
122
|
|
123
123
|
- `rb` generates from just the available Ruby code
|
124
124
|
- `rbi` generates from Sorbet RBI
|
@@ -174,6 +174,7 @@ puts singleton.methods[:gsub]
|
|
174
174
|
|
175
175
|
## Guides
|
176
176
|
|
177
|
+
- [Architecture](docs/architecture.md)
|
177
178
|
- [Core and standard library signature contribution guide](docs/CONTRIBUTING.md)
|
178
179
|
- [Writing signatures guide](docs/sigs.md)
|
179
180
|
- [Stdlib signatures guide](docs/stdlib.md)
|
data/Rakefile
CHANGED
@@ -153,7 +153,7 @@ namespace :generate do
|
|
153
153
|
|
154
154
|
<%- unless class_methods.empty? -%>
|
155
155
|
class <%= target %>SingletonTest < Test::Unit::TestCase
|
156
|
-
include
|
156
|
+
include TestHelper
|
157
157
|
|
158
158
|
# library "pathname", "securerandom" # Declare library signatures to load
|
159
159
|
testing "singleton(::<%= target %>)"
|
@@ -172,7 +172,7 @@ namespace :generate do
|
|
172
172
|
|
173
173
|
<%- unless instance_methods.empty? -%>
|
174
174
|
class <%= target %>Test < Test::Unit::TestCase
|
175
|
-
include
|
175
|
+
include TestHelper
|
176
176
|
|
177
177
|
# library "pathname", "securerandom" # Declare library signatures to load
|
178
178
|
testing "::<%= target %>"
|
data/core/enumerator.rbs
CHANGED
@@ -293,7 +293,7 @@ class Enumerator[unchecked out Elem, out Return] < Object
|
|
293
293
|
# lazy fashion (see Enumerator#size). It can either be a value or a callable
|
294
294
|
# object.
|
295
295
|
#
|
296
|
-
def initialize: (?Integer arg0) { (Enumerator::Yielder arg0) ->
|
296
|
+
def initialize: (?Integer arg0) { (Enumerator::Yielder arg0) -> Return } -> void
|
297
297
|
|
298
298
|
# <!--
|
299
299
|
# rdoc-file=enumerator.c
|