sorbet-runtime 0.5.9760 → 0.5.9771

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
  SHA256:
3
- metadata.gz: b70bef609af0f39a4026540271f74c6223d18538b0905dc14cfeb61b1e1df286
4
- data.tar.gz: a9b822a3ec70816b544742b9a7e9fb1aaede79e800600def6f4405e10ee6a30e
3
+ metadata.gz: af81297e2cdc483c89321b53ba6a462d5cbe51bdf0964e944e364d0bb8f0dec0
4
+ data.tar.gz: 94b86f50861efab01c3587494aac133db01bad1d75a8ee5a54d37a1ac0d435c4
5
5
  SHA512:
6
- metadata.gz: 8bb9b0f3e591852ff938d619ce2052bb184f73edabb4b26557832542b07d0af13fb709b72b8278211768fad8d91d9fa8cabf5ca94d74ac932243cf4356f84251
7
- data.tar.gz: 4490c2e39d17678d21e1fcc16c259aa0167c715ba7a9b33eae47ddc5c7bc877244679292af33ca00e4cbb2851356d654dce978304a04ff2e95b8dbdce2254ecd
6
+ metadata.gz: 3f6de5c5ba421ec55ef532bbd833a7ec84aa95082407d55a53a6f0a822b44b485588666ff11cb6196cdda31cd095538833346f593d0dec49a07f1cc40097c4bd
7
+ data.tar.gz: 8db0eb087514f91a8b9e503f36dd80f9fe6cbd361137983a39539c2a2e567108e314db3df95e58f36210e4fe6c2733fba4c715ad03f7dafb6f6e41d93fa5d4fe
@@ -43,17 +43,17 @@ class T::InterfaceWrapper
43
43
  def initialize(target_obj, interface_mod)
44
44
  if target_obj.is_a?(T::InterfaceWrapper)
45
45
  # wrapped_dynamic_cast should guarantee this never happens.
46
- raise "Unexpected: wrapping a wrapper. Please report to #dev-productivity."
46
+ raise "Unexpected: wrapping a wrapper. Please report this bug at https://github.com/sorbet/sorbet/issues"
47
47
  end
48
48
 
49
49
  if !target_obj.is_a?(interface_mod)
50
50
  # wrapped_dynamic_cast should guarantee this never happens.
51
- raise "Unexpected: `is_a?` failed. Please report to #dev-productivity."
51
+ raise "Unexpected: `is_a?` failed. Please report this bug at https://github.com/sorbet/sorbet/issues"
52
52
  end
53
53
 
54
54
  if target_obj.class == interface_mod
55
55
  # wrapped_dynamic_cast should guarantee this never happens.
56
- raise "Unexpected: exact class match. Please report to #dev-productivity."
56
+ raise "Unexpected: exact class match. Please report this bug at https://github.com/sorbet/sorbet/issues"
57
57
  end
58
58
 
59
59
  @target_obj = target_obj
@@ -78,7 +78,7 @@ class T::InterfaceWrapper
78
78
  elsif target_obj.singleton_class.private_method_defined?(method_name)
79
79
  singleton_class.send(:private, method_name)
80
80
  else
81
- raise "This should never happen. Report to #dev-productivity"
81
+ raise "This should never happen. Report this bug at https://github.com/sorbet/sorbet/issues"
82
82
  end
83
83
  end
84
84
  end
@@ -37,7 +37,6 @@ module T::Private::Abstract::Hooks
37
37
  private def prepended(other)
38
38
  # Prepending abstract methods is weird. You'd only be able to override them via other prepended
39
39
  # modules, or in subclasses. Punt until we have a use case.
40
- Kernel.raise "Prepending abstract mixins is not currently supported. Please explain your use case " \
41
- "to #dev-productivity."
40
+ Kernel.raise "Prepending abstract mixins is not currently supported."
42
41
  end
43
42
  end
@@ -89,8 +89,7 @@ module T::Private::ClassUtils
89
89
  #
90
90
  # That's not necessarily a deal breaker, but for now, we're keeping it as unsupported.
91
91
  raise "You're trying to replace `#{name}` on `#{mod}`, but that method exists in a " \
92
- "prepended module (#{ancestor}), which we don't currently support. Talk to " \
93
- "#dev-productivity for help."
92
+ "prepended module (#{ancestor}), which we don't currently support."
94
93
  end
95
94
  end
96
95
 
@@ -182,7 +182,10 @@ class T::Private::Methods::Signature
182
182
  arg_types = @arg_types
183
183
 
184
184
  if @has_rest
185
- arg_types += [[@rest_name, @rest_type]] * (args_length - @arg_types.length)
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
186
189
 
187
190
  elsif (args_length < @req_arg_count) || (args_length > @arg_types.length)
188
191
  expected_str = @req_arg_count.to_s
@@ -72,7 +72,7 @@ module T::Private::Methods::SignatureValidation
72
72
  " Child definition: #{method_loc_str(signature.method)}\n"
73
73
  end
74
74
  else
75
- raise "Unexpected mode: #{signature.mode}. Please report to #dev-productivity."
75
+ raise "Unexpected mode: #{signature.mode}. Please report this bug at https://github.com/sorbet/sorbet/issues"
76
76
  end
77
77
  end
78
78
 
@@ -97,7 +97,7 @@ module T::Private::Methods::SignatureValidation
97
97
  # Peaceful
98
98
  nil
99
99
  else
100
- raise "Unexpected mode: #{signature.mode}. Please report to #dev-productivity."
100
+ raise "Unexpected mode: #{signature.mode}. Please report this bug at https://github.com/sorbet/sorbet/issues"
101
101
  end
102
102
 
103
103
  # Given a singleton class, we can check if it belongs to a
@@ -4,7 +4,7 @@
4
4
  # A placeholder for when an untyped thing must provide a type.
5
5
  # Raises an exception if it is ever used for validation.
6
6
  class T::Private::Types::NotTyped < T::Types::Base
7
- ERROR_MESSAGE = "Validation is being done on a `NotTyped`. Please report to #dev-productivity."
7
+ ERROR_MESSAGE = "Validation is being done on a `NotTyped`. Please report this bug at https://github.com/sorbet/sorbet/issues"
8
8
 
9
9
  # overrides Base
10
10
  def name
@@ -4,7 +4,7 @@
4
4
  # A marking class for when methods return void.
5
5
  # Should never appear in types directly.
6
6
  class T::Private::Types::Void < T::Types::Base
7
- ERROR_MESSAGE = "Validation is being done on an `Void`. Please report to #dev-productivity."
7
+ ERROR_MESSAGE = "Validation is being done on an `Void`. Please report this bug at https://github.com/sorbet/sorbet/issues"
8
8
 
9
9
  # The actual return value of `.void` methods.
10
10
  #
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.9760
4
+ version: 0.5.9771
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-12 00:00:00.000000000 Z
11
+ date: 2022-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest