Files
codeql/ruby/downgrades/3595c826de6db850f16b9da265a54dbf24dd3126/ruby_method_child.ql
2022-08-25 17:40:52 +02:00

15 lines
389 B
Plaintext

class AstNode extends @ruby_ast_node {
string toString() { none() }
}
from AstNode ruby_method, int index, AstNode child
where
exists(AstNode body |
ruby_method_body(ruby_method, body) and ruby_body_statement_child(body, index, child)
)
or
ruby_method_body(ruby_method, child) and
not child instanceof @ruby_body_statement and
index = 0
select ruby_method, index, child