File tree Expand file tree Collapse file tree
src/codeql_ruby/controlflow/internal
test/library-tests/controlflow/graph Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -313,13 +313,14 @@ module Trees {
313313 }
314314
315315 private class CallTree extends StandardPostOrderTree , Call {
316- // this.getBlock() is not included as it uses a different scope
317316 final override AstNode getChildNode ( int i ) {
318317 result = this .getReceiver ( ) and i = 0
319318 or
320319 result = this .getMethod ( ) and i = 1
321320 or
322321 result = this .getArguments ( ) and i = 2
322+ or
323+ result = this .getBlock ( ) and i = 3
323324 }
324325 }
325326
Original file line number Diff line number Diff line change @@ -647,6 +647,9 @@ cfg.rb:
647647#-----| -> times
648648
649649# 25| times
650+ #-----| -> Block
651+
652+ # 25| Block
650653#-----| -> Call
651654
652655# 25| x
@@ -680,6 +683,9 @@ cfg.rb:
680683#-----| -> new
681684
682685# 29| new
686+ #-----| -> Block
687+
688+ # 29| Block
683689#-----| -> Call
684690
685691# 29| BlockParameter
@@ -1985,6 +1991,9 @@ cfg.rb:
19851991#-----| -> exit top-level (normal)
19861992
19871993# 189| run_block
1994+ #-----| -> Block
1995+
1996+ # 189| Block
19881997#-----| -> Call
19891998
19901999# 189| x
@@ -2627,6 +2636,9 @@ loops.rb:
26272636#-----| -> Array
26282637
26292638# 25| each
2639+ #-----| -> DoBlock
2640+
2641+ # 25| DoBlock
26302642#-----| -> Call
26312643
26322644# 25| x
You can’t perform that action at this time.
0 commit comments