Skip to content

Commit 322f835

Browse files
hvitvedhmac
authored andcommitted
Ruby: Include StringComponents in the CFG
1 parent 301d0bb commit 322f835

File tree

2 files changed

+608
-143
lines changed

2 files changed

+608
-143
lines changed

ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImpl.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,10 @@ module Trees {
13501350
final override ControlFlowTree getChildElement(int i) { result = this.getComponent(i) }
13511351
}
13521352

1353+
private class StringComponentComponentTree extends LeafTree, StringComponent {
1354+
StringComponentComponentTree() { not this instanceof StringInterpolationComponent }
1355+
}
1356+
13531357
private class ToplevelTree extends BodyStmtTree, Toplevel {
13541358
final override AstNode getBodyChild(int i, boolean rescuable) {
13551359
result = this.getBeginBlock(i) and rescuable = true

0 commit comments

Comments
 (0)