sorbet-runtime 0.5.11279 → 0.5.11282

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: e32785464719386a3e5be9aa05279ad8cb28a9fd3bac6d207c448f1db48e75a3
4
- data.tar.gz: 6b3baa936054a0e5e8bdd731ead9ead595d51486a08f2b4283c9a77b55580005
3
+ metadata.gz: 8f3dc44edaa916c8d1ebce5f42ad81c54ca802e8b11306c56a20ddc9bc9a1b6d
4
+ data.tar.gz: f7467f96884f376874ef2c9f537cebcd3e7bd2e111abcd44824e70f0c3cfb186
5
5
  SHA512:
6
- metadata.gz: 4e0f058b268639d3ded476f5b80738321a95655ac6be5bb4e1915708d9421c365d0b9aadc3711ba3d20aa62369daa574a270cc50f49b734549e2c9628768f88a
7
- data.tar.gz: 54341ccebbe77e37811cd9ed2d81807872145fea29cd423394d03449bbfe749de71c8f5cc97270b2aefcafce9e6f16546511e8d3b4e1f3b8bafa936b1e8f292b
6
+ metadata.gz: 18ae1906f6ef7dc08da2b4669701226ed46916f91c256710f971cfa8898c3979a425b5f31a74ff5b9a30869a36564827577f92134c0e0ddba7eb1ff8a530c0b4
7
+ data.tar.gz: 45513381a5a3692e27f7b000f612d3034b08e723e795acde0be811bbd7750e36394a8a43ba1b4c78460aeebdb5d22a406a8a55a97c8537b83e934788427918fe
@@ -4,20 +4,13 @@
4
4
  module T::NonForcingConstants
5
5
  # NOTE: This method is documented on the RBI in Sorbet's payload, so that it
6
6
  # shows up in the hover/completion documentation via LSP.
7
- T::Sig::WithoutRuntime.sig {params(val: BasicObject, klass: String, package: T.nilable(String)).returns(T::Boolean)}
8
- def self.non_forcing_is_a?(val, klass, package: nil)
7
+ T::Sig::WithoutRuntime.sig {params(val: BasicObject, klass: String).returns(T::Boolean)}
8
+ def self.non_forcing_is_a?(val, klass)
9
9
  method_name = "T::NonForcingConstants.non_forcing_is_a?"
10
10
  if klass.empty?
11
11
  raise ArgumentError.new("The string given to `#{method_name}` must not be empty")
12
12
  end
13
13
 
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}"
19
- end
20
-
21
14
  current_klass = T.let(nil, T.nilable(Module))
22
15
  current_prefix = T.let(nil, T.nilable(String))
23
16
 
@@ -25,10 +18,7 @@ module T::NonForcingConstants
25
18
  parts.each do |part|
26
19
  if current_klass.nil?
27
20
  # First iteration
28
- if part != "" && package.nil?
29
- # if we've supplied a package, we're probably running in
30
- # package mode, which means absolute references are
31
- # meaningless
21
+ if part != ""
32
22
  raise ArgumentError.new("The string given to `#{method_name}` must be an absolute constant reference that starts with `::`")
33
23
  end
34
24
 
@@ -37,7 +27,7 @@ module T::NonForcingConstants
37
27
 
38
28
  # if this had a :: prefix, then there's no more loading to
39
29
  # do---skip to the next one
40
- next if part == ""
30
+ next
41
31
  end
42
32
 
43
33
  if current_klass.autoload?(part)
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.11279
4
+ version: 0.5.11282
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-29 00:00:00.000000000 Z
11
+ date: 2024-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest