sorbet-runtime 0.5.5981 → 0.5.5991

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: 6ef024ba1f18a831127692d0a593c97ab174b5565ea24d3ea71f92f039b7e4c5
4
- data.tar.gz: 3acb33f46d6f6bffee8a16066b1930d01be3f1c1da8290924a8d2042e6802726
3
+ metadata.gz: b400aa184ecef7448624aa502683ba8932c1a3a9712dc5afba81826eb511e8ce
4
+ data.tar.gz: f0638d866cf2bcf2b47f205dbb9a231c8380a1b6f05d9170677a71d664ebbe91
5
5
  SHA512:
6
- metadata.gz: 2ac2dc5dcab95f11d5fcd7aca8bfc34d731fa017b638cedda2995521f1526085122b552d3f2bb3312496170898e3284215237b37d88a14c91e6b143a27a8d5b8
7
- data.tar.gz: 3ed25f0734e82849ae495c1b0511bb806ab6c7fe45e3ae186a6e4c25000f1448fb2bfaa5042e5eebbc2c706c5af031db158057b683fe6d2006827474f274ddcd
6
+ metadata.gz: 6c02033ce23748e5e44d33376349762115a5c405e66e19c4aff8b81ca8332c583d9bddce7b68c9cbb873d20d110de1f8d649f5237dd6c0cba4bf16b3c6643b96
7
+ data.tar.gz: fc0677383d474366916930e7d80fcc305eda941dcf019017a17e071c00cb4520597c5140ec97a282ab813a55395027e120f4e31cfe8f273423396676a4e73135
@@ -30,25 +30,29 @@ module T::NonForcingConstants
30
30
 
31
31
  current_klass = Object
32
32
  current_prefix = ''
33
- else
34
- if current_klass.autoload?(part)
35
- # There's an autoload registered for that constant, which means it's not
36
- # yet loaded. `value` can't be an instance of something not yet loaded.
37
- return false
38
- end
39
33
 
40
- # Sorbet guarantees that the string is an absolutely resolved name.
41
- search_inheritance_chain = false
42
- if !current_klass.const_defined?(part, search_inheritance_chain)
43
- return false
44
- end
34
+ # if this had a :: prefix, then there's no more loading to
35
+ # do---skip to the next one
36
+ next if part == ""
37
+ end
38
+
39
+ if current_klass.autoload?(part)
40
+ # There's an autoload registered for that constant, which means it's not
41
+ # yet loaded. `value` can't be an instance of something not yet loaded.
42
+ return false
43
+ end
44
+
45
+ # Sorbet guarantees that the string is an absolutely resolved name.
46
+ search_inheritance_chain = false
47
+ if !current_klass.const_defined?(part, search_inheritance_chain)
48
+ return false
49
+ end
45
50
 
46
- current_klass = current_klass.const_get(part)
47
- current_prefix = "#{current_prefix}::#{part}"
51
+ current_klass = current_klass.const_get(part)
52
+ current_prefix = "#{current_prefix}::#{part}"
48
53
 
49
- if !Module.===(current_klass)
50
- raise ArgumentError.new("#{current_prefix} is not a class or module")
51
- end
54
+ if !Module.===(current_klass)
55
+ raise ArgumentError.new("#{current_prefix} is not a class or module")
52
56
  end
53
57
  end
54
58
 
@@ -67,6 +67,10 @@ class T::Private::Methods::Signature
67
67
  if !extra_names.empty?
68
68
  raise "The declaration for `#{method.name}` has extra parameter(s): #{extra_names.join(', ')}"
69
69
  end
70
+
71
+ if parameters.size != raw_arg_types.size
72
+ raise "The declaration for `#{method.name}` has arguments with duplicate names"
73
+ end
70
74
 
71
75
  parameters.zip(raw_arg_types) do |(param_kind, param_name), (type_name, raw_type)|
72
76
  if type_name != param_name
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.5981
4
+ version: 0.5.5991
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-21 00:00:00.000000000 Z
11
+ date: 2020-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest