Ruby: Add missing doc

This commit is contained in:
Harry Maclean
2022-11-11 18:29:07 +13:00
parent 62ea1f0a05
commit b16cecc8db
2 changed files with 4 additions and 4 deletions

View File

@@ -878,6 +878,7 @@ module ExprNodes {
final override SplatExpr getExpr() { result = super.getExpr() }
/** Gets the operand of this splat expression. */
final ExprCfgNode getOperand() { e.hasCfgChild(e.getOperand(), this, result) }
}

View File

@@ -14,7 +14,7 @@ private predicate stringConstCompare(CfgNodes::AstCfgNode guard, CfgNode testedN
c = guard and
exists(CfgNodes::ExprNodes::StringLiteralCfgNode strLitNode |
// Only consider strings without any interpolations
not exists(StringInterpolationComponent comp | comp = strLitNode.getExpr().getComponent(_)) and
not strLitNode.getExpr().getComponent(_) instanceof StringInterpolationComponent and
c.getExpr() instanceof EqExpr and
branch = true
or
@@ -40,8 +40,7 @@ private predicate stringConstCompare(CfgNodes::AstCfgNode guard, CfgNode testedN
}
/**
* Holds if `guard` is an `or` expression whose operands are string comparison guards that test the same SSA variable.
* `testedNode` is an arbitrary node that is tested by one of the guards.
* Holds if `guard` is an `or` expression whose operands are string comparison guards that test `def`.
* For example:
*
* ```rb
@@ -59,7 +58,7 @@ private predicate stringConstCompareOr(
}
/**
* Holds if guard is an `and` expression containing a string comparison guard in either operand.
* Holds if `guard` is an `and` expression containing a string comparison guard in either operand.
* For example:
*
* ```rb