Skip to content

Commit 8b0d578

Browse files
committed
fix foreach bug in ruby cfg
1 parent 929373a commit 8b0d578

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ruby/ql/lib/codeql/ruby/controlflow/ControlFlowGraph2.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ private module Ast implements AstSig<Location> {
251251

252252
// `ForExpr` would be a match for `ForeachStmt`, but it is desugared.
253253
class ForeachStmt extends LoopStmt {
254+
ForeachStmt() { none() }
255+
254256
Expr getVariable() { none() }
255257

256258
Expr getCollection() { none() }

0 commit comments

Comments
 (0)