mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-18 13:53:01 +08:00
3424ff36c5
The Ruby extractor dropped the method name from a `receiver.method` call: `lg.log()` was recorded as a call to `lg` (the bare receiver), which matches no symbol, so the reference resolved to nothing and no method edge was ever produced. A Ruby method invoked through a receiver had no recorded callers and was invisible to impact/blast-radius and explore flow traces. This is the Ruby-specific blocker noted in #1108 — that local-variable type-inference fix couldn't help Ruby because the call reference itself was missing. extractCall recognized receiver-bearing calls by the `object`/`name`/ `function` fields other grammars use; tree-sitter-ruby's `call` node uses `receiver` + `method`, so it fell through to the generic fallback that takes the first named child (the receiver) as the callee. Handle Ruby `call`/`method_call` explicitly: build `receiver.method`, keep bare `foo(...)` as the method name, emit `Foo.new` as an `instantiates` ref, and give a capitalized (constant) receiver a `references` edge so a class used only via its class methods still records a dependent. With this plus #1108, `lg = Logger.new; lg.log` resolves `lg.log` to `Logger#log`, and the two-file same-name case is same-file-correct (#1079). Adds Ruby to the local-variable inference test matrix plus a focused test asserting `Foo.new` stays an instantiation. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>