Skip to content

Commit 280023c

Browse files
committed
Address review comments
1 parent dd27ed8 commit 280023c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

ruby/ql/lib/codeql/ruby/ast/internal/Synthesis.qll

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -796,10 +796,8 @@ private module ArrayLiteralDesugar {
796796
i = -1 and
797797
child = SynthChild(MethodCallKind("[]", false, al.getNumberOfElements()))
798798
or
799-
exists(AstNode mc |
800-
mc = TMethodCallSynth(al, -1, _, _, _) and
801-
parent = mc
802-
|
799+
parent = TMethodCallSynth(al, -1, _, _, _) and
800+
(
803801
i = 0 and
804802
child = SynthChild(ConstantReadAccessKind("::Array"))
805803
or
@@ -841,10 +839,8 @@ private module HashLiteralDesugar {
841839
i = -1 and
842840
child = SynthChild(MethodCallKind("[]", false, hl.getNumberOfElements()))
843841
or
844-
exists(AstNode mc |
845-
mc = TMethodCallSynth(hl, -1, _, _, _) and
846-
parent = mc
847-
|
842+
parent = TMethodCallSynth(hl, -1, _, _, _) and
843+
(
848844
i = 0 and
849845
child = SynthChild(ConstantReadAccessKind("::Hash"))
850846
or

0 commit comments

Comments
 (0)