sorbet-runtime 0.5.9226 → 0.5.9230
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/types/non_forcing_constants.rb +5 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f08f4560f37a757c65f79e2db438d5a7d81835b2e4b06e55f2ed960edbd03415
|
4
|
+
data.tar.gz: c3c20fb2c51d05fb55067cff4cb0f2dab3315612e836ce6e5a8d7e261e19a06f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
#
|
20
|
-
#
|
21
|
-
|
22
|
-
|
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.
|
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-
|
11
|
+
date: 2021-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|