File tree Expand file tree Collapse file tree
lib/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 @@ -608,6 +608,8 @@ module Trees {
608608 }
609609 }
610610
611+ private class ForwardParameterTree extends LeafTree , ForwardParameter { }
612+
611613 private class ForInTree extends LeafTree , ForIn { }
612614
613615 /**
Original file line number Diff line number Diff line change @@ -2398,7 +2398,7 @@ cfg.rb:
23982398#-----| -> yield ...
23992399
24002400# 194| call to run_block
2401- #-----| -> exit cfg.rb (normal)
2401+ #-----| -> forward_param
24022402
24032403# 194| self
24042404#-----| -> { ... }
@@ -2426,6 +2426,35 @@ cfg.rb:
24262426# 194| x
24272427#-----| -> call to puts
24282428
2429+ # 196| enter forward_param
2430+ #-----| -> a
2431+
2432+ # 196| forward_param
2433+ #-----| -> exit cfg.rb (normal)
2434+
2435+ # 196| exit forward_param
2436+
2437+ # 196| exit forward_param (normal)
2438+ #-----| -> exit forward_param
2439+
2440+ # 196| a
2441+ #-----| -> b
2442+
2443+ # 196| b
2444+ #-----| -> ...
2445+
2446+ # 196| ...
2447+ #-----| -> self
2448+
2449+ # 197| call to bar
2450+ #-----| -> exit forward_param (normal)
2451+
2452+ # 197| self
2453+ #-----| -> b
2454+
2455+ # 197| b
2456+ #-----| -> call to bar
2457+
24292458desugar.rb:
24302459# 1| enter m1
24312460#-----| -> x
Original file line number Diff line number Diff line change @@ -193,6 +193,10 @@ def run_block
193193
194194run_block { |x |puts x }
195195
196+ def forward_param ( a , b , ...)
197+ bar ( b , ...)
198+ end
199+
196200__END__
197201
198202Some ignored nonsense
You can’t perform that action at this time.
0 commit comments