sorbet-runtime 0.4.4488 → 0.4.4489

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: a116208a6bfaece57449b224726b8e300da9baf4
4
- data.tar.gz: a23dfb1abe879e236eaefb6048093630184ed43b
3
+ metadata.gz: 19183723ae45c2ada6482baa860e1464c519c73b
4
+ data.tar.gz: 5f01aa46a1a96a96202e73cb95b100480338352c
5
5
  SHA512:
6
- metadata.gz: f530c44c67bd7ef84e7bb40184e9c281e0f5f48d79e7ad889ee5fafa70068e94965dece72b0a277ea9c3a0ebbb69f6da941764bce0e0df2ac8ea40c026cd7bf7
7
- data.tar.gz: 89e1a2785ed35a667c5ac3af2f37f1f62b08f23e2961be05fab7042247b8a46afd245c24efc05783dd5574bb98e9359c00ea4ff044e205b90067def7e45e42af
6
+ metadata.gz: 1727553304f6d7461ff65c1ccfca756883ea0f6105789ad853e1de355ff9018ec5b9892ea9e2b58cac37d8096a55ab253c76d7d95fd47017e72c56756ae346f5
7
+ data.tar.gz: 84722c1a6432db6a955b0816d5cf1a5c0c12e47cc6c464c92a9004f7de071817cc0b2633d047d7be6feb4de448b2ea5547b4156d8a9e580fbb0eb12ddc192d7c
@@ -11,7 +11,6 @@ class T::Private::DeclState
11
11
  end
12
12
 
13
13
  attr_accessor :active_declaration
14
- attr_accessor :skip_next_on_method_added
15
14
 
16
15
  def reset!
17
16
  self.active_declaration = nil
@@ -171,20 +171,10 @@ module T::Private::Methods
171
171
 
172
172
  # Only public because it needs to get called below inside the replace_method blocks below.
173
173
  def self._on_method_added(hook_mod, method_name, is_singleton_method: false)
174
- if T::Private::DeclState.current.skip_next_on_method_added
175
- T::Private::DeclState.current.skip_next_on_method_added = false
176
- return
177
- end
178
-
179
174
  current_declaration = T::Private::DeclState.current.active_declaration
180
175
  mod = is_singleton_method ? hook_mod.singleton_class : hook_mod
181
176
  original_method = mod.instance_method(method_name)
182
177
 
183
- if T::Private::Final.final_module?(mod) && (current_declaration.nil? || !current_declaration.final)
184
- raise "`#{mod.name}` was declared as final but its method `#{method_name}` was not declared as final"
185
- end
186
- _check_final_ancestors(mod, mod.ancestors, [method_name])
187
-
188
178
  return if current_declaration.nil?
189
179
  T::Private::DeclState.current.reset!
190
180
 
@@ -198,7 +188,6 @@ module T::Private::Methods
198
188
  # (or unwrap back to the original method).
199
189
  new_method = nil
200
190
  # this prevents us from running the final checks twice for every method def.
201
- T::Private::DeclState.current.skip_next_on_method_added = true
202
191
  T::Private::ClassUtils.replace_method(mod, method_name) do |*args, &blk|
203
192
  if !T::Private::Methods.has_sig_block_for_method(new_method)
204
193
  # This should only happen if the user used alias_method to grab a handle
@@ -433,7 +422,6 @@ module T::Private::Methods
433
422
  attached = nil
434
423
  # this prevents the final checks from triggering about singleton_method_added not being a final method even if the
435
424
  # module is final.
436
- T::Private::DeclState.current.skip_next_on_method_added = true
437
425
  original_singleton_method = T::Private::ClassUtils.replace_method(singleton_klass, :singleton_method_added) do |name|
438
426
  attached = self
439
427
  T::Private::Methods._on_method_added(self, name, is_singleton_method: true)
@@ -163,7 +163,6 @@ module T::Private::Methods::CallValidation
163
163
  end
164
164
 
165
165
  def self.create_validator_method(mod, original_method, method_sig, original_visibility)
166
- T::Private::DeclState.current.skip_next_on_method_added = true
167
166
  has_fixed_arity = method_sig.kwarg_types.empty? && !method_sig.has_rest && !method_sig.has_keyrest &&
168
167
  original_method.parameters.all? {|(kind, _name)| kind == :req}
169
168
  all_args_are_simple = method_sig.arg_types.all? {|_name, type| type.is_a?(T::Types::Simple)}
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.4488
4
+ version: 0.4.4489
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe