sorbet-runtime 0.5.5923 → 0.5.5935

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: da8f1dd7f7ac0bc13c1131309eac74c8f5dc5cb424546eef9e778984abbfba2c
4
- data.tar.gz: eda54189abf3dafd76b61ca88d8e94c5f83032224bc135cbb2758cb6dd3e7f78
3
+ metadata.gz: 65574adf5815ae5f4d9b1b84bc57b3d5c03a20158899092080d84046c272d3f1
4
+ data.tar.gz: 9d9a18876e1ff249786972959ee4dab6a3e5c3eb638c7d8686315429d0b60c38
5
5
  SHA512:
6
- metadata.gz: 147a764af6562a8fe120351535c612bad146e80bdb5b9ff05e54bb55ad31f02b5e0cbb593de07c934d0611c2d2a4a6cc3d1339f676b86c37a57d7fe67240b4d8
7
- data.tar.gz: e65f42ca4ffee2f464e43c509b2eace998903a9324665cc51a763943c48ebd627e83c48a5d4d55e87b0462ed29529bba86c5951cb42cd30f0543e8b87498862b
6
+ metadata.gz: 4b955633f3066864c897bb67ef74bc27fc7eef5b85e1af5447c50ca522fd4f4d7e01a7f7b3f872768ff0707a59af97f1fd396d81fc3a72cc82abc24e512309d4
7
+ data.tar.gz: f03bb89469daf5e53d89343eb05274427582f39620f0ae90e24a50264a314caeb13e2ff1de1584772875ab6860186fe8990b007df8f562a28f6b1984181068cd
@@ -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.5923
4
+ version: 0.5.5935
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-26 00:00:00.000000000 Z
11
+ date: 2020-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest