Skip to content

Commit 5e3a817

Browse files
committed
Ruby: With[out]Element only valid in input
1 parent 0c2dd1a commit 5e3a817

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

ruby/ql/docs/flow_summaries.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,10 @@ some_call(x)
198198
## `WithElement`
199199
This component restricts the set of elements that are included in the preceding
200200
access path to to those at a specific set of indices. The specifiers are the
201-
same as those for `Element`.
201+
same as those for `Element`. It is only valid in an input path.
202202

203-
When used in an input path this component has the effect of copying
204-
all relevant elements from the input to the output. For example, in the
205-
following summary:
203+
This component has the effect of copying all relevant elements from the input to
204+
the output. For example, in the following summary:
206205

207206
```ql
208207
input = "Argument[0].WithElement[1, 2]" and
@@ -220,17 +219,13 @@ output = "ReturnValue" and
220219
preservesValue = true
221220
```
222221

223-
TODO: I've not seen this component used in an output path; I don't know if it makes
224-
sense to do so, or what meaning it would have.
225-
226222
## `WithoutElement`
227223
This component is used to exclude certain elements from the set included in the
228224
preceding access path. It takes the same specifiers as `WithElement` and
229-
`Element`.
225+
`Element`. It is only valid in an input path.
230226

231-
When used in an input path this component has the effect of excluding the
232-
relevant elements when copying from input to output. For example in the
233-
following summary:
227+
This component has the effect of excluding the relevant elements when copying
228+
from input to output. For example in the following summary:
234229

235230
```ql
236231
input = "Argument[0].WithoutElement[0]" and
@@ -240,7 +235,4 @@ output = "ReturnValue"
240235
any data in any index of the first argument will be copied to the return value,
241236
with the exception of data at index 0.
242237

243-
TODO: I've not seen this component used in an output path; I don't know if it makes
244-
sense to do so, or what meaning it would have.
245-
246238
[^1]: I've chosen this name to avoid overloading the word "argument".

0 commit comments

Comments
 (0)