Ruby: update some uses of getConstantValue()

This commit is contained in:
Asger F
2022-10-17 14:44:47 +02:00
parent 156964bfc9
commit 436cc60138
8 changed files with 16 additions and 29 deletions

View File

@@ -20,7 +20,7 @@ import codeql.ruby.ast.Literal
from AmbiguousPathCall call
where
// there is not a constant string argument
not exists(call.getPathArgument().asExpr().getExpr().getConstantValue()) and
not exists(call.getPathArgument().getConstantValue()) and
// if it's a format string, then the first argument is not a constant string
not call.getPathArgument().getALocalSource().asExpr().getExpr().(StringLiteral).getComponent(0)
instanceof StringTextComponent