sorbet-runtime 0.5.5859 → 0.5.5867

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
  SHA256:
3
- metadata.gz: b26613ee717e93406be9863f6de88ba9ed7d56be71c14e5b9a0f6dea865f6bbd
4
- data.tar.gz: 7c52bb7c5ea5624c002a69e6f38c02f64cdf4f1f1b7b0b03a90093511cac169c
3
+ metadata.gz: dde6e267ab0bd3fdca05c18e77786d70d4211ec12b30417fbac0fa4011d38f79
4
+ data.tar.gz: 0b81917ca354e7ecd5b481873229a03c56599770a83259594dc9a95655abd36b
5
5
  SHA512:
6
- metadata.gz: ce4dcea125090bb935cfe36e7d2c4c6421a4011b135a4c6f2eed4526c814b385d491f2e846629335181af9ec6f39fe7a2046d8333b971698e4a83f14397a3340
7
- data.tar.gz: 3b3d85510672d63af66e8603e848e98e4d8c1305e8946acc4a58b21079cbab63a510884e521cc744ba72d1136e7de10bb6d685eaade360af9f03e8fb50579a77
6
+ metadata.gz: b282af712bf3545adc9f58bb7ea036a169355393bd6f5dc75f8bf68ee51037b6812ed281157351f27a92679bbbb979da7896ed17fc7558209be59ec6d32723e2
7
+ data.tar.gz: 4c29397d5404596b0c4243522f773bcddc7428b15bebeb276a9aace686452bc9675d1d3ca31d63389442e73647731f1e441284d8f127ea2e7a6e9aab362b90ad
@@ -272,15 +272,8 @@ module T::Private::Methods
272
272
  receiving_method = receiving_class.instance_method(callee)
273
273
  if receiving_method != original_method && receiving_method.original_name == original_method.name
274
274
  aliasing_mod = receiving_method.owner
275
-
276
- # Note, this logic is duplicated above, make sure to keep changes in sync.
277
- if method_sig.check_level == :always || (method_sig.check_level == :tests && T::Private::RuntimeLevels.check_tests?)
278
- # Checked, so copy the original signature to the aliased copy.
279
- T::Private::Methods.unwrap_method(aliasing_mod, method_sig, original_method)
280
- else
281
- # Unchecked, so just make `alias_method` behave as if it had been called pre-sig.
282
- aliasing_mod.send(:alias_method, callee, original_method.name)
283
- end
275
+ method_sig = method_sig.as_alias(callee)
276
+ unwrap_method(aliasing_mod, method_sig, original_method)
284
277
  end
285
278
 
286
279
  method_sig
@@ -304,7 +297,7 @@ module T::Private::Methods
304
297
  Signature.new_untyped(method: original_method)
305
298
  end
306
299
 
307
- unwrap_method(hook_mod, signature, original_method)
300
+ unwrap_method(signature.method.owner, signature, original_method)
308
301
  signature
309
302
  end
310
303
 
@@ -356,8 +349,8 @@ module T::Private::Methods
356
349
  end
357
350
  end
358
351
 
359
- def self.unwrap_method(hook_mod, signature, original_method)
360
- maybe_wrapped_method = CallValidation.wrap_method_if_needed(signature.method.owner, signature, original_method)
352
+ def self.unwrap_method(mod, signature, original_method)
353
+ maybe_wrapped_method = CallValidation.wrap_method_if_needed(mod, signature, original_method)
361
354
  @signatures_by_method[method_to_key(maybe_wrapped_method)] = signature
362
355
  end
363
356
 
@@ -121,6 +121,15 @@ class T::Private::Methods::Signature
121
121
  end
122
122
  end
123
123
 
124
+ attr_writer :method_name
125
+ protected :method_name=
126
+
127
+ def as_alias(alias_name)
128
+ new_sig = clone
129
+ new_sig.method_name = alias_name
130
+ new_sig
131
+ end
132
+
124
133
  def arg_count
125
134
  @arg_types.length
126
135
  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.5859
4
+ version: 0.5.5867
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-01 00:00:00.000000000 Z
11
+ date: 2020-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest