Skip to content

Commit b28f60c

Browse files
committed
Ruby: Add test for documenting missing flow through destructured parameters
1 parent 3e2c6d6 commit b28f60c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ruby/ql/test/library-tests/dataflow/params/params_flow.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,13 @@ def splat_followed_by_keyword_param(a, *b, c:)
116116
x = []
117117
x[some_index()] = taint(61)
118118
positional(*x)
119+
120+
def destruct((a,b), (c,(d,e)))
121+
sink a # $ MISSING: hasValueFlow=62
122+
sink b # $ MISSING: hasValueFlow=63
123+
sink c # $ MISSING: hasValueFlow=64
124+
sink d
125+
sink e # $ MISSING: hasValueFlow=65
126+
end
127+
128+
destruct([taint(62), taint(63)], [taint(64), [0, taint(65)]])

0 commit comments

Comments
 (0)