File tree Expand file tree Collapse file tree 3 files changed +53
-1
lines changed
ruby/ql/test/library-tests/controlflow/graph Expand file tree Collapse file tree 3 files changed +53
-1
lines changed Original file line number Diff line number Diff line change @@ -1010,7 +1010,7 @@ case.rb:
1010
1010
#-----| -> value
1011
1011
1012
1012
# 69| case_match_various
1013
- #-----| -> exit case.rb (normal)
1013
+ #-----| -> case_match_guard_no_else
1014
1014
1015
1015
# 69| exit case_match_various
1016
1016
@@ -1311,6 +1311,51 @@ case.rb:
1311
1311
#-----| raise -> exit case_match_various (abnormal)
1312
1312
#-----| match -> exit case_match_various (normal)
1313
1313
1314
+ # 95| enter case_match_guard_no_else
1315
+ #-----| -> value
1316
+
1317
+ # 95| case_match_guard_no_else
1318
+ #-----| -> exit case.rb (normal)
1319
+
1320
+ # 95| exit case_match_guard_no_else
1321
+
1322
+ # 95| exit case_match_guard_no_else (abnormal)
1323
+ #-----| -> exit case_match_guard_no_else
1324
+
1325
+ # 95| exit case_match_guard_no_else (normal)
1326
+ #-----| -> exit case_match_guard_no_else
1327
+
1328
+ # 95| value
1329
+ #-----| -> case ...
1330
+
1331
+ # 96| case ...
1332
+ #-----| -> value
1333
+
1334
+ # 96| value
1335
+ #-----| -> in ... then ...
1336
+
1337
+ # 97| in ... then ...
1338
+ #-----| -> x
1339
+
1340
+ # 97| x
1341
+ #-----| match -> x
1342
+
1343
+ # 97| ... == ...
1344
+ #-----| true -> 6
1345
+ #-----| raise -> exit case_match_guard_no_else (abnormal)
1346
+
1347
+ # 97| x
1348
+ #-----| -> 5
1349
+
1350
+ # 97| 5
1351
+ #-----| -> ... == ...
1352
+
1353
+ # 97| then ...
1354
+ #-----| -> exit case_match_guard_no_else (normal)
1355
+
1356
+ # 97| 6
1357
+ #-----| -> then ...
1358
+
1314
1359
cfg.html.erb:
1315
1360
# 5| enter cfg.html.erb
1316
1361
#-----| -> @title
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ positionalArguments
90
90
| case.rb:77:8:77:18 | call to [] | case.rb:77:11:77:13 | :"foo" |
91
91
| case.rb:77:8:77:18 | call to [] | case.rb:77:15:77:17 | :"bar" |
92
92
| case.rb:85:15:85:21 | ... == ... | case.rb:85:20:85:21 | 10 |
93
+ | case.rb:97:13:97:18 | ... == ... | case.rb:97:18:97:18 | 5 |
93
94
| cfg.html.erb:6:9:6:58 | call to stylesheet_link_tag | cfg.html.erb:6:29:6:41 | "application" |
94
95
| cfg.html.erb:6:9:6:58 | call to stylesheet_link_tag | cfg.html.erb:6:44:6:58 | Pair |
95
96
| cfg.html.erb:12:11:12:33 | call to link_to | cfg.html.erb:12:19:12:21 | "A" |
Original file line number Diff line number Diff line change @@ -91,3 +91,9 @@ def case_match_various value
91
91
in ( 0 | "" | [ ] | { } )
92
92
end
93
93
end
94
+
95
+ def case_match_guard_no_else value
96
+ case value
97
+ in x if x == 5 then 6
98
+ end
99
+ end
You can’t perform that action at this time.
0 commit comments