Skip to content

Commit 4ae90e3

Browse files
committed
Ruby: inline transitive class-hierarchy getters
1 parent 472a10f commit 4ae90e3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ruby/ql/lib/codeql/ruby/ast/Module.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ class Module extends TModule {
3333
Module getAnImmediateDescendent() { this = result.getAnImmediateAncestor() }
3434

3535
/** Gets a module that is transitively subclassed, included, or prepended by this module. */
36+
pragma[inline]
3637
Module getAnAncestor() { result = this.getAnImmediateAncestor*() }
3738

3839
/** Gets a module that transitively subclasses, includes, or prepends this module. */
40+
pragma[inline]
3941
Module getADescendent() { result = this.getAnImmediateDescendent*() }
4042

4143
/** Holds if this module is a class. */

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,9 +739,11 @@ class ModuleNode instanceof Module {
739739
final ModuleNode getAnImmediateDescendent() { result = super.getAnImmediateDescendent() }
740740

741741
/** Gets a module that is transitively subclassed, included, or prepended by this module. */
742+
pragma[inline]
742743
final ModuleNode getAnAncestor() { result = super.getAnAncestor() }
743744

744745
/** Gets a module that transitively subclasses, includes, or prepends this module. */
746+
pragma[inline]
745747
final ModuleNode getADescendent() { result = super.getADescendent() }
746748

747749
/**

0 commit comments

Comments
 (0)