diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll index 4d7d32fcfaeeb..db57e5745e4cc 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll @@ -477,6 +477,7 @@ private module Cached { } or TSynthSplatArgumentNode(CfgNodes::ExprNodes::CallCfgNode c) or TSynthSplatArgumentElementNode(CfgNodes::ExprNodes::CallCfgNode c, int n) { + // we use -1 to represent data at an unknown index n in [-1 .. 10] and exists(Argument arg, ArgumentPosition pos | pos.isSplat(any(int p | p > 0)) and arg.isArgumentOf(c, pos) @@ -1549,7 +1550,7 @@ predicate storeStepCommon(Node node1, ContentSet c, Node node2) { } /** - * A store step from a `SynthSplatArgumentElementNode` into a `SynthSplatArgumentNode`. + * Holds if data can flow from a `SynthSplatArgumentElementNode` into a `SynthSplatArgumentNode` via a store step. * For example in * * ```rb @@ -1630,7 +1631,7 @@ predicate readStepCommon(Node node1, ContentSet c, Node node2) { } /** - * A read step from a splat argument to a `SynthSplatArgumentElementNode`. + * Holds if data can flow from a splat argument to a `SynthSplatArgumentElementNode` via a read step. * For example in * ```rb * foo(x, y, *[1, 2])