sorbet-runtime 0.5.9226 → 0.5.9230

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: e8cdcef662dbe5323e8c3b4cbda0fe64cfe63a8ced6b30c1ef73a5ad8c74e191
4
- data.tar.gz: 24a99182bb9c42782deff1875122a7727bc06abd41203954558e773eb9146af4
3
+ metadata.gz: f08f4560f37a757c65f79e2db438d5a7d81835b2e4b06e55f2ed960edbd03415
4
+ data.tar.gz: c3c20fb2c51d05fb55067cff4cb0f2dab3315612e836ce6e5a8d7e261e19a06f
5
5
  SHA512:
6
- metadata.gz: 2a6525413246d28d353f783b105e56400de765c294d4b2807c4dc0bf8d399df6a0feec27b1ef72a41916686e5e171e340d7fcb56f04de4cb7214bd7f26c5b704
7
- data.tar.gz: c451aa1efdef95681a0e61a85b0d29fc46926ef2639cc762df16bd9db5e2d7cb28618aef7d658ddacaacb9f5d2c2d079f801ab15b153d818d9c53cb0def42b33
6
+ metadata.gz: 86d3345e230239ad15da032cffa660827adf7b610d26136e417d836b0dec990c27f99b77c9d578f47e0df75b49288e657758af1f92d7c41745f3665537bd4e5a
7
+ data.tar.gz: 7b8dc69a22a4cf6980a3dc7a69bbdcb27a7791627764021e030fee743172e64b74f17aec1017b1832ee74cceebaf4a7513e4279e62c28d9e5ed9b7f56de0237b
@@ -2,11 +2,6 @@
2
2
  # typed: strict
3
3
 
4
4
  module T::NonForcingConstants
5
- T::Sig::WithoutRuntime.sig {returns(T::Boolean)}
6
- private_class_method def self.stripe_packages_enabled?
7
- const_defined?('StripePackages') && const_get('StripePackages').enabled?
8
- end
9
-
10
5
  # NOTE: This method is documented on the RBI in Sorbet's payload, so that it
11
6
  # shows up in the hover/completion documentation via LSP.
12
7
  T::Sig::WithoutRuntime.sig {params(val: BasicObject, klass: String, package: T.nilable(String)).returns(T::Boolean)}
@@ -16,10 +11,11 @@ module T::NonForcingConstants
16
11
  raise ArgumentError.new("The string given to `#{method_name}` must not be empty")
17
12
  end
18
13
 
19
- # TODO(gdritter): this might not be want we want in a multipackage
20
- # world; revisit this implementation we move on from the monopackage
21
- if stripe_packages_enabled?
22
- klass = "PkgRegistry::#{package}::#{klass}"
14
+ # We don't treat packages differently at runtime, but the static
15
+ # type-checker still needs to have the package and constant
16
+ # separated out. This just re-assembles the string as needed
17
+ if !package.nil?
18
+ klass = "::#{package}::#{klass}"
23
19
  end
24
20
 
25
21
  current_klass = T.let(nil, T.nilable(Module))
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.9226
4
+ version: 0.5.9230
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-13 00:00:00.000000000 Z
11
+ date: 2021-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest