Skip to content

Commit 44a6158

Browse files
committed
Add test case with rest variable and no prefix elements
1 parent f08eb8e commit 44a6158

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

ruby/ql/test/library-tests/ast/Ast.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,7 @@ control/cases.rb:
864864
# 67| getPattern: [ArrayPattern] [ ..., * ]
865865
# 68| getBranch: [InClause] in ... then ...
866866
# 68| getPattern: [ArrayPattern] [ ..., * ]
867+
# 68| getRestVariableAccess: [LocalVariableAccess] x
867868
# 68| getSuffixElement: [IntegerLiteral] 3
868869
# 68| getSuffixElement: [IntegerLiteral] 4
869870
# 69| getBranch: [InClause] in ... then ...

ruby/ql/test/library-tests/ast/ValueText.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@
156156
| control/cases.rb:65:13:65:13 | 3 | 3 |
157157
| control/cases.rb:66:7:66:7 | 1 | 1 |
158158
| control/cases.rb:66:14:66:14 | 3 | 3 |
159-
| control/cases.rb:68:10:68:10 | 3 | 3 |
160-
| control/cases.rb:68:13:68:13 | 4 | 4 |
159+
| control/cases.rb:68:11:68:11 | 3 | 3 |
160+
| control/cases.rb:68:14:68:14 | 4 | 4 |
161161
| control/cases.rb:69:10:69:10 | 3 | 3 |
162162
| control/cases.rb:70:11:70:11 | 3 | 3 |
163163
| control/cases.rb:71:7:71:7 | :a | a |

ruby/ql/test/library-tests/ast/control/CaseExpr.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ caseAllBranches
6767
| cases.rb:39:1:80:3 | case ... | 25 | cases.rb:65:3:65:18 | in ... then ... |
6868
| cases.rb:39:1:80:3 | case ... | 26 | cases.rb:66:3:66:16 | in ... then ... |
6969
| cases.rb:39:1:80:3 | case ... | 27 | cases.rb:67:3:67:9 | in ... then ... |
70-
| cases.rb:39:1:80:3 | case ... | 28 | cases.rb:68:3:68:15 | in ... then ... |
70+
| cases.rb:39:1:80:3 | case ... | 28 | cases.rb:68:3:68:16 | in ... then ... |
7171
| cases.rb:39:1:80:3 | case ... | 29 | cases.rb:69:3:69:15 | in ... then ... |
7272
| cases.rb:39:1:80:3 | case ... | 30 | cases.rb:70:3:70:17 | in ... then ... |
7373
| cases.rb:39:1:80:3 | case ... | 31 | cases.rb:71:3:71:10 | in ... then ... |

ruby/ql/test/library-tests/ast/control/cases.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
in [1, 2, 3, *]
6666
in [1, *x, 3]
6767
in [*]
68-
in [*, 3, 4]
68+
in [*x, 3, 4]
6969
in [*, 3, *]
7070
in [*a, 3, *b]
7171
in {a:}

0 commit comments

Comments
 (0)