sorbet-runtime 0.5.10802 → 0.5.10803
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/lib/types/private/methods/signature.rb +17 -11
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8f2a6f0327904a3a54ce9116a19778a60b5bdc911e7f93e6c2a85e56c94d3e5
|
|
4
|
+
data.tar.gz: df1ba0d0e0c3c44f57c6d3569b5cc9cbe2d82048575324a018dafe703952038d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 986468a2c1b233457b54967925076ff3f991f698a4b1ff676709f59f5b27fa9990111e74ddfd3b92e3978b816a4d9b3193c0e6508e969aed38d07c8fe85ed735
|
|
7
|
+
data.tar.gz: c4158d6ce6012a05c023694222640ab338a324340186ed611a06bd2e5bd1366545080747ea934024a8b7b3a2dcf654ce51b5fd8506ee6edc0a746191febeb9fa
|
|
@@ -179,15 +179,7 @@ class T::Private::Methods::Signature
|
|
|
179
179
|
kwargs = EMPTY_HASH
|
|
180
180
|
end
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
if @has_rest
|
|
185
|
-
rest_count = args_length - @arg_types.length
|
|
186
|
-
rest_count = 0 if rest_count.negative?
|
|
187
|
-
|
|
188
|
-
arg_types += [[@rest_name, @rest_type]] * rest_count
|
|
189
|
-
|
|
190
|
-
elsif (args_length < @req_arg_count) || (args_length > @arg_types.length)
|
|
182
|
+
if !@has_rest && ((args_length < @req_arg_count) || (args_length > @arg_types.length))
|
|
191
183
|
expected_str = @req_arg_count.to_s
|
|
192
184
|
if @arg_types.length != @req_arg_count
|
|
193
185
|
expected_str += "..#{@arg_types.length}"
|
|
@@ -197,10 +189,23 @@ class T::Private::Methods::Signature
|
|
|
197
189
|
|
|
198
190
|
begin
|
|
199
191
|
it = 0
|
|
200
|
-
|
|
201
|
-
|
|
192
|
+
|
|
193
|
+
# Process given pre-rest args. When there are no rest args,
|
|
194
|
+
# this is just the given number of args.
|
|
195
|
+
while it < args_length && it < @arg_types.length
|
|
196
|
+
yield @arg_types[it][0], args[it], @arg_types[it][1]
|
|
202
197
|
it += 1
|
|
203
198
|
end
|
|
199
|
+
|
|
200
|
+
if @has_rest
|
|
201
|
+
rest_count = args_length - @arg_types.length
|
|
202
|
+
rest_count = 0 if rest_count.negative?
|
|
203
|
+
|
|
204
|
+
rest_count.times do
|
|
205
|
+
yield @rest_name, args[it], @rest_type
|
|
206
|
+
it += 1
|
|
207
|
+
end
|
|
208
|
+
end
|
|
204
209
|
end
|
|
205
210
|
|
|
206
211
|
kwargs.each do |name, val|
|
|
@@ -208,6 +213,7 @@ class T::Private::Methods::Signature
|
|
|
208
213
|
if !type && @has_keyrest
|
|
209
214
|
type = @keyrest_type
|
|
210
215
|
end
|
|
216
|
+
|
|
211
217
|
yield name, val, type if type
|
|
212
218
|
end
|
|
213
219
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sorbet-runtime
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.10803
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-05-
|
|
11
|
+
date: 2023-05-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|