sorbet-runtime 0.4.4550 → 0.4.4551

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62b23e9ede32f4422e619619c4f90b008477ed23
4
- data.tar.gz: cb7a91c4777131ed7c1289442977472b8b36094e
3
+ metadata.gz: a241d12177418dcbbac0586d8d464064f92ec954
4
+ data.tar.gz: f894e93f84450aa137d2769f2eb05f90d58a4d5f
5
5
  SHA512:
6
- metadata.gz: da2632c33d81e9f311d7c35940a1d911080b55bb1ebe78eef1d19752f1024d5dd7d4b3f8e0782aa6d095ab0462a813da6124e5432685662d47957bdd8b6d136f
7
- data.tar.gz: f45b338595de2cfc23970d815fe9a8f05b7d3145758ca79a9068371a68b20ce08306fe6fecac67ad99108ba3de63506130ff2b093033e485ab41a43f5bce770c
6
+ metadata.gz: 0437ac957c276e93c48ce2cfbf0f91b6c1a776cb1352840e9e5cac97980d90779aa24f5035b2aa7ce1b60fe156c5248c3df409563ea6c6825e1119f45320f11e
7
+ data.tar.gz: cc48a69be8c29840322ec4536bb5975a60fcd0881c77914e80d2f39204db236dcd17ff5ec17a23b1c59effb9f5b6ad399375f61289bd26acb3bcc9469653af15
@@ -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
- T::Private::Methods.sig_error(location, error.message)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4550
4
+ version: 0.4.4551
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe