archspec 1.1.0.rc1 → 1.1.0.rc2

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: 3d1149a18e2ffb69c03d15e95ca539d3c42c1fda406376069313b9e07365a1b1
4
- data.tar.gz: 290b05eb65ad246ebd1d81a025abe013a3150d5afc7e0bb6cb834dae3f64a429
3
+ metadata.gz: 9ae3db03b27c8b620de672283e7ff539eacf0e02db06a8f02c169aad8f4bf314
4
+ data.tar.gz: '01364687e888415205e3397ffc649e38d96e6bd5ae63cc2dbaae6c453d6bdd22'
5
5
  SHA512:
6
- metadata.gz: 2e02c22290a4616b60edb2a5fd97ba991237e6da3b2fe495a5fde7802ac520fa432c821a9eb895c98333ce1acb170aff476ffa016c1de924199a9b47463d3994
7
- data.tar.gz: 99d07ea4daff657b1823a81beff200f2139a3646c1ef7ad1bb3f041f13a9a03d7bd39a8b5b4b0176bda00ca13506043a691a1c93f65f54eed33a17c129e0f6af
6
+ metadata.gz: a3744ea8826f19ff6a0c125c54bfac608c36faca53d4a56e15f5c0a5bbc334610985c34cba9cc5b2624939a18062e82d8a4d7c47a21fcaa0ab7250f561516b15
7
+ data.tar.gz: 74b660133723ac4baa18c980c2caa53a9e63e373f37abeb5a2c2a57b43d022a4c41faf6ab4ea3b45bd88f71d5ead637308c106801dfe880179bded85e4b5008b
@@ -35,7 +35,9 @@ module ArchSpec
35
35
  next if consumers.empty?
36
36
 
37
37
  target = graph.resolve_edge_constant(edge)
38
- includer = consumers.find { |name| target == name || target.start_with?("#{name}::") }
38
+ next if within_namespace?(target, edge.from_constant)
39
+
40
+ includer = consumers.find { |name| within_namespace?(target, name) }
39
41
  next unless includer
40
42
 
41
43
  Diagnostic.new(
@@ -49,6 +51,10 @@ module ArchSpec
49
51
 
50
52
  private
51
53
 
54
+ def within_namespace?(constant, namespace)
55
+ constant == namespace || constant.start_with?("#{namespace}::")
56
+ end
57
+
52
58
  # Maps each mixed-in module to the set of constants that mix it in.
53
59
  def includers_by_module(graph)
54
60
  map = Hash.new { |hash, key| hash[key] = Set.new }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ArchSpec
4
- VERSION = '1.1.0.rc1'
4
+ VERSION = '1.1.0.rc2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: archspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.rc1
4
+ version: 1.1.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carmine Paolino
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-08-26 00:00:00.000000000 Z
11
+ date: 2026-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prism