Skip to content

Commit b16cecc

Browse files
committed
Ruby: Add missing doc
1 parent 62ea1f0 commit b16cecc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ruby/ql/lib/codeql/ruby/controlflow/CfgNodes.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ module ExprNodes {
878878

879879
final override SplatExpr getExpr() { result = super.getExpr() }
880880

881+
/** Gets the operand of this splat expression. */
881882
final ExprCfgNode getOperand() { e.hasCfgChild(e.getOperand(), this, result) }
882883
}
883884

ruby/ql/lib/codeql/ruby/dataflow/BarrierGuards.qll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ private predicate stringConstCompare(CfgNodes::AstCfgNode guard, CfgNode testedN
1414
c = guard and
1515
exists(CfgNodes::ExprNodes::StringLiteralCfgNode strLitNode |
1616
// Only consider strings without any interpolations
17-
not exists(StringInterpolationComponent comp | comp = strLitNode.getExpr().getComponent(_)) and
17+
not strLitNode.getExpr().getComponent(_) instanceof StringInterpolationComponent and
1818
c.getExpr() instanceof EqExpr and
1919
branch = true
2020
or
@@ -40,8 +40,7 @@ private predicate stringConstCompare(CfgNodes::AstCfgNode guard, CfgNode testedN
4040
}
4141

4242
/**
43-
* Holds if `guard` is an `or` expression whose operands are string comparison guards that test the same SSA variable.
44-
* `testedNode` is an arbitrary node that is tested by one of the guards.
43+
* Holds if `guard` is an `or` expression whose operands are string comparison guards that test `def`.
4544
* For example:
4645
*
4746
* ```rb
@@ -59,7 +58,7 @@ private predicate stringConstCompareOr(
5958
}
6059

6160
/**
62-
* Holds if guard is an `and` expression containing a string comparison guard in either operand.
61+
* Holds if `guard` is an `and` expression containing a string comparison guard in either operand.
6362
* For example:
6463
*
6564
* ```rb

0 commit comments

Comments
 (0)