Ruby: Remove two redundant checks

This commit is contained in:
Tom Hvitved
2024-08-21 16:58:53 +02:00
parent d15e1b5598
commit b0003c0453

View File

@@ -1191,8 +1191,7 @@ private module ParameterNodes {
/** Holds if a read-step should be added into parameter `p`. */
predicate readInto(ParameterNode p, ContentSet c) {
exists(int n |
isParameterNode(p, callable, any(ParameterPosition pos | pos.isPositional(n))) and
not exists(int i | splatParameterAt(callable.asCfgScope(), i) and i < n)
isParameterNode(p, callable, any(ParameterPosition pos | pos.isPositional(n)))
|
c = getArrayContent(n)
or
@@ -1465,7 +1464,6 @@ module ArgumentNodes {
exists(int n, ArgumentPosition pos |
arg.isArgumentOf(call, pos) and
pos.isPositional(n) and
not exists(int i | splatArgumentAt(call, i) and i < n) and
c = getArrayContent(n)
)
}