From a09f1de6ad944605fad7cd8ac3a373216b36efa9 Mon Sep 17 00:00:00 2001 From: Harry Maclean Date: Thu, 14 Sep 2023 10:02:27 +0100 Subject: [PATCH] Ruby: Fix doc comments --- .../ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll index 9f33714940d95..4f1faf27ec195 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll @@ -474,6 +474,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) @@ -1546,7 +1547,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 @@ -1627,7 +1628,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])