Skip to content

Commit 4037d1f

Browse files
committed
Ruby: Cache ErbDirective::getAChildStmt
1 parent 4c5f32b commit 4037d1f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ class ErbDirective extends TDirectiveNode, ErbAstNode {
157157
* Gets a statement that starts in directive that is not a child of any other
158158
* statement starting in this directive.
159159
*/
160+
cached
160161
Stmt getAChildStmt() {
161162
this.containsAstNodeStart(result) and
162163
not this.containsAstNodeStart(result.getParent())

0 commit comments

Comments
 (0)