diff --git a/ql/src/codeql_ruby/AST.qll b/ql/src/codeql_ruby/AST.qll index 244b82b2ecc..0c895478ddf 100644 --- a/ql/src/codeql_ruby/AST.qll +++ b/ql/src/codeql_ruby/AST.qll @@ -64,4 +64,16 @@ class AstNode extends TAstNode { */ cached AstNode getAChild(string pred) { none() } + + /** + * Holds if this node was synthesized to represent an implicit AST node not + * present in the source code. In the following example method call, the + * receiver is an implicit `self` reference, for which there is a synthesized + * `Self` node. + * + * ```rb + * foo(123) + * ``` + */ + predicate isSynthesized() { this instanceof TImplicitSelf } }