mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Ruby: Add post-update argument nodes for string constants
This commit is contained in:
@@ -322,7 +322,11 @@ private class Argument extends CfgNodes::ExprCfgNode {
|
||||
|
||||
/** Holds if `n` is not a constant expression. */
|
||||
predicate isNonConstantExpr(CfgNodes::ExprCfgNode n) {
|
||||
not exists(n.getConstantValue()) and
|
||||
not exists(ConstantValue cv |
|
||||
cv = n.getConstantValue() and
|
||||
// strings are mutable in Ruby
|
||||
not cv.isString(_)
|
||||
) and
|
||||
not n.getExpr() instanceof ConstantAccess
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user