Skip to content

Commit

Permalink
Merge pull request #547 from Shopify/dependabot/bundler/minor-and-pat…
Browse files Browse the repository at this point in the history
…ch-14b97385c9

Bump the minor-and-patch group across 1 directory with 3 updates
  • Loading branch information
github-actions[bot] authored May 14, 2024
2 parents 51ec2ce + 3da5d9c commit 2a588a7
Show file tree
Hide file tree
Showing 5 changed files with 5,368 additions and 4,355 deletions.
26 changes: 13 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PATH
specs:
spoom (1.3.2)
erubi (>= 1.10.0)
prism (>= 0.19.0)
prism (>= 0.28.0)
sorbet-static-and-runtime (>= 0.5.10187)
thor (>= 0.19.2)

Expand Down Expand Up @@ -34,14 +34,14 @@ GEM
parser (3.3.1.0)
ast (~> 2.4.1)
racc
prism (0.27.0)
prism (0.29.0)
psych (5.1.2)
stringio
racc (1.7.3)
rainbow (3.1.1)
rake (13.2.1)
rbi (0.1.12)
prism (>= 0.18.0, < 0.28)
rbi (0.1.13)
prism (>= 0.18.0, < 1.0.0)
sorbet-runtime (>= 0.5.9204)
rdoc (6.6.3.1)
psych (>= 4.0.0)
Expand All @@ -67,16 +67,16 @@ GEM
rubocop-sorbet (0.8.3)
rubocop (>= 0.90.0)
ruby-progressbar (1.13.0)
sorbet (0.5.11361)
sorbet-static (= 0.5.11361)
sorbet-runtime (0.5.11361)
sorbet-static (0.5.11361-universal-darwin)
sorbet-static (0.5.11361-x86_64-linux)
sorbet-static-and-runtime (0.5.11361)
sorbet (= 0.5.11361)
sorbet-runtime (= 0.5.11361)
sorbet (0.5.11372)
sorbet-static (= 0.5.11372)
sorbet-runtime (0.5.11372)
sorbet-static (0.5.11372-universal-darwin)
sorbet-static (0.5.11372-x86_64-linux)
sorbet-static-and-runtime (0.5.11372)
sorbet (= 0.5.11372)
sorbet-runtime (= 0.5.11372)
stringio (3.1.0)
tapioca (0.13.3)
tapioca (0.14.1)
bundler (>= 2.2.25)
netrc (>= 0.11.0)
parallel (>= 1.21.0)
Expand Down
13 changes: 11 additions & 2 deletions lib/spoom/deadcode/indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,19 @@ def visit_constant_or_write_node(node)
visit(node.value)
end

sig { override.params(node: Prism::ConstantPathNode).void }
def visit_constant_path_node(node)
parent = node.parent

visit(parent) if parent
reference_constant(node.name.to_s, node)
end

sig { override.params(node: Prism::ConstantPathWriteNode).void }
def visit_constant_path_write_node(node)
parent = node.target.parent
name = node.target.child.slice
const_path_node = node.target
parent = const_path_node.parent
name = const_path_node.name.to_s

if parent
visit(parent)
Expand Down
Loading

0 comments on commit 2a588a7

Please sign in to comment.