Skip to content

Commit 30d2df5

Browse files
committed
Include MethodCall.getAChild in {Unary,Binary}Operation.getAChild
1 parent edfdfb1 commit 30d2df5

File tree

3 files changed

+287
-283
lines changed

3 files changed

+287
-283
lines changed

ql/lib/codeql/ruby/ast/Operation.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class UnaryOperation extends Operation, MethodCall instanceof UnaryOperationImpl
3030
final override AstNode getAChild(string pred) {
3131
result = Operation.super.getAChild(pred)
3232
or
33+
result = MethodCall.super.getAChild(pred)
34+
or
3335
pred = "getOperand" and result = this.getOperand()
3436
}
3537

@@ -127,6 +129,8 @@ class BinaryOperation extends Operation, MethodCall instanceof BinaryOperationIm
127129
override AstNode getAChild(string pred) {
128130
result = Operation.super.getAChild(pred)
129131
or
132+
result = MethodCall.super.getAChild(pred)
133+
or
130134
pred = "getLeftOperand" and result = this.getLeftOperand()
131135
or
132136
pred = "getRightOperand" and result = this.getRightOperand()

0 commit comments

Comments
 (0)