Skip to content

Commit 503d2f7

Browse files
committed
Ruby: Rework mayBenefitFromCallContext
1 parent aeae208 commit 503d2f7

File tree

7 files changed

+186
-184
lines changed

7 files changed

+186
-184
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Call extends Expr instanceof CallImpl {
5858
TCfgScope(result) = viableCallableLambda(c, _)
5959
)
6060
or
61-
result = getTarget(this.getAControlFlowNode())
61+
result = getTarget(TNormalCall(this.getAControlFlowNode()))
6262
}
6363

6464
override AstNode getAChild(string pred) {

ruby/ql/lib/codeql/ruby/dataflow/FlowSummary.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ deprecated class RequiredSummaryComponentStack = Impl::Private::RequiredSummaryC
7070
*/
7171
private module LibraryCallbackSummaries {
7272
private predicate libraryCall(CfgNodes::ExprNodes::CallCfgNode call) {
73-
not exists(getTarget(call))
73+
not exists(getTarget(TNormalCall(call)))
7474
}
7575

7676
private DataFlow::LocalSourceNode trackLambdaCreation(TypeTracker t) {

0 commit comments

Comments
 (0)