Skip to content

Commit 161d766

Browse files
committed
Ruby: address review comments on array_flow.rb
1 parent 8248a94 commit 161d766

File tree

3 files changed

+6019
-5990
lines changed

3 files changed

+6019
-5990
lines changed

ruby/ql/lib/codeql/ruby/frameworks/Array.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,12 @@ module Array {
479479
CombinationSummary() { this = "combination" }
480480

481481
override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
482-
input = "ArrayElement of Receiver" and
483-
output = "ArrayElement[?] of Parameter[0] of BlockArgument" and
482+
(
483+
input = "ArrayElement of Receiver" and
484+
output = "ArrayElement[?] of Parameter[0] of BlockArgument"
485+
or
486+
input = "Receiver" and output = "ReturnValue"
487+
) and
484488
preservesValue = true
485489
}
486490
}

0 commit comments

Comments
 (0)