Skip to content

Commit 7332cec

Browse files
committed
Ruby: fix missing 'self' parameters in ModuleNode.getAnImmediateReferenc
1 parent 29a2055 commit 7332cec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,9 @@ class ModuleNode instanceof Module {
890890
/** Gets a constant or `self` variable that refers to this module. */
891891
LocalSourceNode getAnImmediateReference() {
892892
result.asExpr().getExpr() = super.getAnImmediateReference()
893+
or
894+
// Include 'self' parameters; these are not expressions and so not found by the case above
895+
result = this.getAnOwnModuleSelf()
893896
}
894897

895898
/**

0 commit comments

Comments
 (0)