Ruby: fix missing 'self' parameters in ModuleNode.getAnImmediateReferenc

This commit is contained in:
Asger F
2023-04-17 09:15:34 +02:00
parent 29a20550f6
commit 7332cec9a5

View File

@@ -890,6 +890,9 @@ class ModuleNode instanceof Module {
/** Gets a constant or `self` variable that refers to this module. */
LocalSourceNode getAnImmediateReference() {
result.asExpr().getExpr() = super.getAnImmediateReference()
or
// Include 'self' parameters; these are not expressions and so not found by the case above
result = this.getAnOwnModuleSelf()
}
/**