sorbet-runtime 0.4.4308 → 0.4.4309

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: b0baa561ee9ea38b05238c1b2513d3438341cef8
4
- data.tar.gz: e02a43b8bfe1093c860e4e2adda9d4eb5a5285fd
3
+ metadata.gz: 32d48ba7766e8fecc62f28ebcea3d7198767f66d
4
+ data.tar.gz: 66d65f707e0efb75283c4a7aa66f9811041d019a
5
5
  SHA512:
6
- metadata.gz: 2ba7c502250cb6c8d2899751b1f60f3581f47fe9ea5803dc69d6de15678d613ee4828821d1f7d225d160d38801ebc622f9e16afb8ee203cccb38ca952610d4c3
7
- data.tar.gz: 610ad682036524510559078f4404dbe3414b8d631a1908817891b5968f9246d89d7176b029af749bfbcda1ed4755d5a2e577a78ebc5ddc8d370eb096fc4864cf
6
+ metadata.gz: 88984c4781452bc16fd7cd56ae0221937d29a1c614ae18c2495df14ea2750bb5154e71fcbe964ebad1ad68159f83f45e5912ac6400efe067aaf69c238e3f04f4
7
+ data.tar.gz: c60d8937796a9e787033d8a1e90629bca4d62d6e71a5378e5b3da62c572f270006fcda67b884daf76b944520da272231564f305cf0d9a2eb0742c775e9fdbe06
@@ -2,6 +2,21 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module T::Configuration
5
+ # Announces to Sorbet that we are currently in a test environment, so it
6
+ # should treat any sigs which are marked `.checked(:tests)` as if they were
7
+ # just a normal sig.
8
+ #
9
+ # If this method is not called, sigs marked `.checked(:tests)` will not be
10
+ # checked. In fact, such methods won't even be wrapped--the runtime will put
11
+ # back the original method.
12
+ #
13
+ # Note: Due to the way sigs are evaluated and methods are wrapped, this
14
+ # method MUST be called before any code calls `sig`. This method raises if
15
+ # it has been called too late.
16
+ def self.enable_checking_for_sigs_marked_checked_tests
17
+ T::Private::RuntimeLevels.enable_checking_in_tests
18
+ end
19
+
5
20
  # Set a handler to handle `TypeError`s raised by any in-line type assertions,
6
21
  # including `T.must`, `T.let`, `T.cast`, and `T.assert_type!`.
7
22
  #
data/lib/types/utils.rb CHANGED
@@ -110,10 +110,6 @@ module T::Utils
110
110
  end
111
111
  end
112
112
 
113
- def self.DANGER_enable_checking_in_tests
114
- T::Private::RuntimeLevels.enable_checking_in_tests
115
- end
116
-
117
113
  # Returns the arity of a method, unwrapping the sig if needed
118
114
  def self.arity(method)
119
115
  arity = method.arity # rubocop:disable PrisonGuard/NoArity
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.4308
4
+ version: 0.4.4309
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe