mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Ruby: Add CFG test for forward parameters
This commit is contained in:
@@ -2398,7 +2398,7 @@ cfg.rb:
|
||||
#-----| -> yield ...
|
||||
|
||||
# 194| call to run_block
|
||||
#-----| -> exit cfg.rb (normal)
|
||||
#-----| -> forward_param
|
||||
|
||||
# 194| self
|
||||
#-----| -> { ... }
|
||||
@@ -2426,6 +2426,17 @@ cfg.rb:
|
||||
# 194| x
|
||||
#-----| -> call to puts
|
||||
|
||||
# 196| enter forward_param
|
||||
#-----| -> a
|
||||
|
||||
# 196| forward_param
|
||||
#-----| -> exit cfg.rb (normal)
|
||||
|
||||
# 196| a
|
||||
#-----| -> b
|
||||
|
||||
# 196| b
|
||||
|
||||
desugar.rb:
|
||||
# 1| enter m1
|
||||
#-----| -> x
|
||||
|
||||
@@ -193,6 +193,10 @@ end
|
||||
|
||||
run_block { |x|puts x }
|
||||
|
||||
def forward_param(a, b, ...)
|
||||
bar(b, ...)
|
||||
end
|
||||
|
||||
__END__
|
||||
|
||||
Some ignored nonsense
|
||||
|
||||
Reference in New Issue
Block a user