sorbet-runtime 0.4.4550 → 0.4.4551
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a241d12177418dcbbac0586d8d464064f92ec954
|
|
4
|
+
data.tar.gz: f894e93f84450aa137d2769f2eb05f90d58a4d5f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0437ac957c276e93c48ce2cfbf0f91b6c1a776cb1352840e9e5cac97980d90779aa24f5035b2aa7ce1b60fe156c5248c3df409563ea6c6825e1119f45320f11e
|
|
7
|
+
data.tar.gz: cc48a69be8c29840322ec4536bb5975a60fcd0881c77914e80d2f39204db236dcd17ff5ec17a23b1c59effb9f5b6ad399375f61289bd26acb3bcc9469653af15
|
data/lib/types/configuration.rb
CHANGED
|
@@ -120,7 +120,7 @@ module T::Configuration
|
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
private_class_method def self.sig_builder_error_handler_default(error, location)
|
|
123
|
-
|
|
123
|
+
raise ArgumentError.new("#{location.path}:#{location.lineno}: Error interpreting `sig`:\n #{error.message}\n\n")
|
|
124
124
|
end
|
|
125
125
|
|
|
126
126
|
def self.sig_builder_error_handler(error, location)
|
|
@@ -245,10 +245,6 @@ module T::Private::Methods
|
|
|
245
245
|
end
|
|
246
246
|
end
|
|
247
247
|
|
|
248
|
-
def self.sig_error(loc, message)
|
|
249
|
-
raise(ArgumentError.new("#{loc.path}:#{loc.lineno}: Error interpreting `sig`:\n #{message}\n\n"))
|
|
250
|
-
end
|
|
251
|
-
|
|
252
248
|
# Executes the `sig` block, and converts the resulting Declaration
|
|
253
249
|
# to a Signature.
|
|
254
250
|
def self.run_sig(hook_mod, method_name, original_method, declaration_block)
|
|
@@ -289,10 +285,6 @@ module T::Private::Methods
|
|
|
289
285
|
"class/module."
|
|
290
286
|
end
|
|
291
287
|
|
|
292
|
-
if current_declaration.returns.equal?(ARG_NOT_PROVIDED)
|
|
293
|
-
sig_error(loc, "You must provide a return type; use the `.returns` or `.void` builder methods. Method: #{original_method}")
|
|
294
|
-
end
|
|
295
|
-
|
|
296
288
|
signature = Signature.new(
|
|
297
289
|
method: original_method,
|
|
298
290
|
method_name: method_name,
|
|
@@ -238,6 +238,10 @@ module T::Private::Methods
|
|
|
238
238
|
def finalize!
|
|
239
239
|
check_live!
|
|
240
240
|
|
|
241
|
+
if decl.returns.equal?(ARG_NOT_PROVIDED)
|
|
242
|
+
raise BuilderError.new("You must provide a return type; use the `.returns` or `.void` builder methods.")
|
|
243
|
+
end
|
|
244
|
+
|
|
241
245
|
if decl.bind.equal?(ARG_NOT_PROVIDED)
|
|
242
246
|
decl.bind = nil
|
|
243
247
|
end
|