File tree Expand file tree Collapse file tree 3 files changed +3
-9
lines changed
lib/codeql/ruby/controlflow/internal
test/library-tests/controlflow/graph Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -371,7 +371,9 @@ module Trees {
371
371
CallTree ( ) {
372
372
// Logical operations are handled separately
373
373
not this instanceof UnaryLogicalOperation and
374
- not this instanceof BinaryLogicalOperation
374
+ not this instanceof BinaryLogicalOperation and
375
+ // Calls with the `&.` operator are desugared
376
+ not this .( MethodCall ) .isSafeNavigation ( )
375
377
}
376
378
377
379
override ControlFlowTree getChildElement ( int i ) { result = this .getArgument ( i ) }
Original file line number Diff line number Diff line change @@ -3593,7 +3593,6 @@ cfg.rb:
3593
3593
#-----| -> do ... end
3594
3594
3595
3595
# 202| call to times
3596
- #-----| -> self
3597
3596
#-----| -> __synth__0__1
3598
3597
3599
3598
# 202| do ... end
@@ -3636,7 +3635,6 @@ cfg.rb:
3636
3635
3637
3636
# 205| call to foo
3638
3637
#-----| -> ... = ...
3639
- #-----| -> 1
3640
3638
3641
3639
# 205| nil
3642
3640
#-----| -> if ...
@@ -3647,9 +3645,6 @@ cfg.rb:
3647
3645
# 205| ...
3648
3646
#-----| -> exit cfg.rb (normal)
3649
3647
3650
- # 205| call to bar
3651
- #-----| -> exit cfg.rb (normal)
3652
-
3653
3648
# 205| call to bar
3654
3649
#-----| -> if ...
3655
3650
@@ -3679,7 +3674,6 @@ cfg.rb:
3679
3674
3680
3675
# 205| { ... }
3681
3676
#-----| -> call to bar
3682
- #-----| -> call to bar
3683
3677
3684
3678
# 205| x
3685
3679
#-----| -> x
Original file line number Diff line number Diff line change @@ -205,8 +205,6 @@ positionalArguments
205
205
| cfg.rb:200:18:200:30 | call to puts | cfg.rb:200:30:200:30 | a |
206
206
| cfg.rb:202:19:202:31 | call to puts | cfg.rb:202:31:202:31 | c |
207
207
| cfg.rb:205:1:205:23 | call to bar | cfg.rb:205:10:205:10 | 1 |
208
- | cfg.rb:205:1:205:23 | call to bar | cfg.rb:205:10:205:10 | 1 |
209
- | cfg.rb:205:1:205:23 | call to bar | cfg.rb:205:12:205:12 | 2 |
210
208
| cfg.rb:205:1:205:23 | call to bar | cfg.rb:205:12:205:12 | 2 |
211
209
| cfg.rb:205:4:205:5 | call to == | cfg.rb:205:1:205:3 | __synth__0__1 |
212
210
| desugar.rb:2:5:2:6 | ... + ... | desugar.rb:2:8:2:8 | 1 |
You can’t perform that action at this time.
0 commit comments