rbs 3.0.3 → 3.0.4
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/lib/rbs/cli.rb +19 -3
- data/lib/rbs/variance_calculator.rb +1 -1
- data/lib/rbs/version.rb +1 -1
- 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: be4870f9cbfced10b6cbfe578fc38429fa9c4232fe687a4a4e075a3970db2a0c
|
4
|
+
data.tar.gz: 837608d29d1541864457f307dbb52c9809bdc92325d8c255414c6034ba6f3b77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3cb35ee898cfe7da1dedac7ff448a201391da32fab7aef37ef0547fb0bdfbf887b8c72fdb2351357501811bfbe6c14f018de92f4ccb81d21833be03b243bcf4
|
7
|
+
data.tar.gz: 838ef9460abf1ba9e59ae8b5a70a704b1a3b931f83ef86f111f6729434e28680e26df3f2dc5ee367a9b28019fdd542272873eac44a200bf7f70438371582494b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/rbs/cli.rb
CHANGED
@@ -230,6 +230,19 @@ EOB
|
|
230
230
|
end
|
231
231
|
end
|
232
232
|
end
|
233
|
+
|
234
|
+
env.class_alias_decls.each do |name, entry|
|
235
|
+
case entry
|
236
|
+
when Environment::ModuleAliasEntry
|
237
|
+
if list.include?(:module)
|
238
|
+
stdout.puts "#{name} (module alias)"
|
239
|
+
end
|
240
|
+
when Environment::ClassAliasEntry
|
241
|
+
if list.include?(:class)
|
242
|
+
stdout.puts "#{name} (class alias)"
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
233
246
|
end
|
234
247
|
|
235
248
|
if list.include?(:interface)
|
@@ -272,7 +285,10 @@ EOU
|
|
272
285
|
builder = DefinitionBuilder::AncestorBuilder.new(env: env)
|
273
286
|
type_name = TypeName(args[0]).absolute!
|
274
287
|
|
275
|
-
|
288
|
+
case env.constant_entry(type_name)
|
289
|
+
when Environment::ClassEntry, Environment::ModuleEntry, Environment::ClassAliasEntry, Environment::ModuleAliasEntry
|
290
|
+
type_name = env.normalize_module_name(type_name)
|
291
|
+
|
276
292
|
ancestors = case kind
|
277
293
|
when :instance
|
278
294
|
builder.instance_ancestors(type_name)
|
@@ -334,7 +350,7 @@ EOU
|
|
334
350
|
builder = DefinitionBuilder.new(env: env)
|
335
351
|
type_name = TypeName(args[0]).absolute!
|
336
352
|
|
337
|
-
if env.
|
353
|
+
if env.module_name?(type_name)
|
338
354
|
definition = case kind
|
339
355
|
when :instance
|
340
356
|
builder.build_instance(type_name)
|
@@ -388,7 +404,7 @@ EOU
|
|
388
404
|
type_name = TypeName(args[0]).absolute!
|
389
405
|
method_name = args[1].to_sym
|
390
406
|
|
391
|
-
unless env.
|
407
|
+
unless env.module_name?(type_name)
|
392
408
|
stdout.puts "Cannot find class: #{type_name}"
|
393
409
|
return
|
394
410
|
end
|
@@ -135,7 +135,7 @@ module RBS
|
|
135
135
|
|
136
136
|
type_params = case type
|
137
137
|
when Types::ClassInstance
|
138
|
-
env.class_decls[type.name].type_params
|
138
|
+
env.class_decls[env.normalize_module_name(type.name)].type_params
|
139
139
|
when Types::Interface
|
140
140
|
env.interface_decls[type.name].decl.type_params
|
141
141
|
when Types::Alias
|
data/lib/rbs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: RBS is the language for type signatures for Ruby and standard library
|
14
14
|
definitions.
|