decode 0.24.1 → 0.24.2

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: 16fcc036ea4c0db950c8dccf9b8f7a8a8b646e4375d5aa51dae09aa119269916
4
- data.tar.gz: 209ee8f76ba71de8f80df11d838f734d36867bc7bde266188731e07e16cfadd2
3
+ metadata.gz: d6a3ca54cbbfe55c6946466efdeef71ee9b103ceb59ab27c313a9e3a4345264b
4
+ data.tar.gz: 00fe1c5faa769e7daa607cd46a48920ad04b4926493e1b841154d9a5f193b12a
5
5
  SHA512:
6
- metadata.gz: 841791e39cb636b47ed5a2bd9f5974ab8fc77bccf1fb7ab932300aa0c32046afe47a42ebc562c3580bfc53363b89bc5afcb9e1af151f3c414dc367b4a940d02e
7
- data.tar.gz: 173fa08e9dcac6fa0afdc73ccb9452afb95c4dccf00333e0209692628bb0336e80cd1eea65061458e301980726e94701d08e3e02fccaa30482b1faf97b49331d
6
+ metadata.gz: 288e3c278877013c633055242d28c1f2097ca38576896f86d486ee56f1ef3e246af36dce75d30c9c364cd65b9d4928b875b0f7d384c485efde3b27cad8658b14
7
+ data.tar.gz: debf415bab150aaeb345e3013bc6d07896ccf02006e0787eef2ba73754b9c02725007df042e397bedfc02d0b7b8acc266a946535acafcc6d03bd4e069836a937
checksums.yaml.gz.sig CHANGED
Binary file
@@ -26,18 +26,18 @@ module Decode
26
26
  def generate(index, output: $stdout)
27
27
  # Build nested RBS AST structure using a hash for proper ||= behavior
28
28
  declarations = {}
29
- roots = []
29
+ roots = {}
30
30
 
31
31
  # Efficiently traverse the trie to find containers and their methods
32
32
  index.trie.traverse do |lexical_path, node, descend|
33
33
  # Process container definitions at this node
34
34
  if node.values
35
- containers = node.values.select {|definition| definition.container? && definition.public?}
35
+ containers = node.values.select{|definition| definition.container? && definition.public?}
36
36
  containers.each do |definition|
37
37
  case definition
38
38
  when Decode::Language::Ruby::Class, Decode::Language::Ruby::Module
39
39
  if declaration = build_nested_declaration(definition, declarations, index)
40
- roots << declaration
40
+ roots[definition.qualified_name] ||= declaration
41
41
  end
42
42
  end
43
43
  end
@@ -51,7 +51,7 @@ module Decode
51
51
  writer = ::RBS::Writer.new(out: output)
52
52
 
53
53
  unless roots.empty?
54
- writer.write(roots)
54
+ writer.write(roots.values)
55
55
  end
56
56
  end
57
57
 
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2020-2025, by Samuel Williams.
5
5
 
6
6
  module Decode
7
- VERSION = "0.24.1"
7
+ VERSION = "0.24.2"
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.1
4
+ version: 0.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file