File tree Expand file tree Collapse file tree
ql/src/codeql_ruby/ast/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,14 +188,12 @@ private class IncludeOrPrependCall extends MethodCall {
188188 * methods evaluate the block in the context of some other module/class instead of
189189 * the enclosing one.
190190 */
191- private ModuleBase enclosingModule ( AstNode node ) {
192- exists ( AstNode parent | parent = node .getParent ( ) |
193- result = parent
194- or
195- not parent instanceof ModuleBase and
196- not parent instanceof Block and
197- result = enclosingModule ( parent )
198- )
191+ private ModuleBase enclosingModule ( AstNode node ) { result = parent * ( node ) .getParent ( ) }
192+
193+ private AstNode parent ( AstNode n ) {
194+ result = n .getParent ( ) and
195+ not result instanceof ModuleBase and
196+ not result instanceof Block
199197}
200198
201199private string prepends ( string qname ) {
You can’t perform that action at this time.
0 commit comments