From 0852068bcd4efcf101ea7693ea18a54ab573897a Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 3 Dec 2020 12:45:46 +0100 Subject: [PATCH] CFG: make lambda a CFG entry point --- ql/src/codeql_ruby/controlflow/ControlFlowGraph.qll | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ql/src/codeql_ruby/controlflow/ControlFlowGraph.qll b/ql/src/codeql_ruby/controlflow/ControlFlowGraph.qll index e5080230046..a15066674b7 100644 --- a/ql/src/codeql_ruby/controlflow/ControlFlowGraph.qll +++ b/ql/src/codeql_ruby/controlflow/ControlFlowGraph.qll @@ -8,7 +8,8 @@ private import internal.Splitting private import internal.Completion private class CfgScopeRange = - @program or @begin_block or @end_block or @method or @singleton_method or @block or @do_block; + @program or @begin_block or @end_block or @method or @singleton_method or @block or @do_block or + @lambda; /** An AST node with an associated control-flow graph. */ class CfgScope extends AstNode, CfgScopeRange { @@ -32,6 +33,9 @@ class CfgScope extends AstNode, CfgScopeRange { or this instanceof DoBlock and result = "do block" + or + this instanceof Lambda and + result = "lambda" } }