sorbet-runtime 0.5.5920 → 0.5.5933

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: b7cbed9d3d7294ad373072199f8802d61550e35554f8c9ea99ed72ee28642433
4
- data.tar.gz: e64faf7a0d13f55f7a5e3b2afe8ce9559da34332e17062024b4e63069a69bf50
3
+ metadata.gz: c92a75fe79c522e335066738814de17e700c39bc5d8ab51a624e322d3b49b5ae
4
+ data.tar.gz: 137658277f4c10c99d0f3376bbb913a3836d3e21ee4e6782548713fb9d337a15
5
5
  SHA512:
6
- metadata.gz: ace2b6b4dc5340ad580842522e428d20f6f94ce0ef3261c08b58c04c999898068d14d59b1ed7028f49e21c311f2564383431094f5d88874a3ffb5ea94aa5ef31
7
- data.tar.gz: 0c4da44db036f59c8c98044f205a3dc574bc53e054109aa868cc52a1b70e50f56006874648a4deeca0e5ea1beab95804a436e5b147efdbe6e6d66730efc9a981
6
+ metadata.gz: af51ab5702387a8e006f9b9bbdc652af741dc1615166492a502f3b976f432870e5f5163837b443e9ca67ae3d832f6a02f622fe498178266269c4a05ac3e8519e
7
+ data.tar.gz: acc89cd11e379e7eb0b9290bc1a0ba3dbd336d22a7143bc5cca7a16fee62040e424e6867cccdb1b2afb18934faf8bcc18a81c45288abfb30abe67cfcb391a805
@@ -4,8 +4,11 @@
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).returns(T::Boolean)}
8
- def self.non_forcing_is_a?(val, klass)
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)
9
+ # TODO(gdritter): once we have a runtime implementation of
10
+ # packages, we'll need to actually handle the `package` argument
11
+ # here.
9
12
  method_name = "T::NonForcingConstants.non_forcing_is_a?"
10
13
  if klass.empty?
11
14
  raise ArgumentError.new("The string given to `#{method_name}` must not be empty")
@@ -18,7 +21,10 @@ module T::NonForcingConstants
18
21
  parts.each do |part|
19
22
  if current_klass.nil?
20
23
  # First iteration
21
- if part != ""
24
+ if part != "" && package.nil?
25
+ # if we've supplied a package, we're probably running in
26
+ # package mode, which means absolute references are
27
+ # meaningless
22
28
  raise ArgumentError.new("The string given to `#{method_name}` must be an absolute constant reference that starts with `::`")
23
29
  end
24
30
 
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.5920
4
+ version: 0.5.5933
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-24 00:00:00.000000000 Z
11
+ date: 2020-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest