Skip to content

Commit 20b851a

Browse files
committed
improve ErbExecutionDirective definition
1 parent df9e0df commit 20b851a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,10 @@ class ErbOutputDirective extends ErbDirective {
235235
* ```
236236
*/
237237
class ErbExecutionDirective extends ErbDirective {
238+
private Erb::Directive g;
239+
238240
ErbExecutionDirective() {
239-
not (
240-
this instanceof ErbCommentDirective or
241-
this instanceof ErbGraphqlDirective or
242-
this instanceof ErbOutputDirective
243-
)
241+
this = TDirective(g)
244242
}
245243

246244
final override string toString() { result = "<%" + this.getToken().toString() + "%>" }

0 commit comments

Comments
 (0)