Skip to content

Commit 472a10f

Browse files
committed
Ruby: direct -> immediate
1 parent 0f1b348 commit 472a10f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ class Module extends TModule {
2525
Module getAnIncludedModule() { result = getAnIncludedModule(this) }
2626

2727
/** Gets the super class or an included or prepended module. */
28-
Module getADirectAncestor() {
28+
Module getAnImmediateAncestor() {
2929
result = [this.getSuperClass(), this.getAPrependedModule(), this.getAnIncludedModule()]
3030
}
3131

3232
/** Gets a direct subclass or module including or prepending this one. */
33-
Module getADirectDescendent() { this = result.getADirectAncestor() }
33+
Module getAnImmediateDescendent() { this = result.getAnImmediateAncestor() }
3434

3535
/** Gets a module that is transitively subclassed, included, or prepended by this module. */
36-
Module getAnAncestor() { result = this.getADirectAncestor*() }
36+
Module getAnAncestor() { result = this.getAnImmediateAncestor*() }
3737

3838
/** Gets a module that transitively subclasses, includes, or prepends this module. */
39-
Module getADescendent() { result = this.getADirectDescendent*() }
39+
Module getADescendent() { result = this.getAnImmediateDescendent*() }
4040

4141
/** Holds if this module is a class. */
4242
pragma[noinline]

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,10 @@ class ModuleNode instanceof Module {
733733
final ModuleNode getAnIncludedModule() { result = super.getAnIncludedModule() }
734734

735735
/** Gets the super class or an included or prepended module. */
736-
final ModuleNode getADirectAncestor() { result = super.getADirectAncestor() }
736+
final ModuleNode getAnImmediateAncestor() { result = super.getAnImmediateAncestor() }
737737

738738
/** Gets a direct subclass or module including or prepending this one. */
739-
final ModuleNode getADirectDescendent() { result = super.getADirectDescendent() }
739+
final ModuleNode getAnImmediateDescendent() { result = super.getAnImmediateDescendent() }
740740

741741
/** Gets a module that is transitively subclassed, included, or prepended by this module. */
742742
final ModuleNode getAnAncestor() { result = super.getAnAncestor() }
@@ -1190,7 +1190,7 @@ class ConstRef extends LocalSourceNode {
11901190
*/
11911191
pragma[nomagic]
11921192
private TConstLookupScope getATargetScope() {
1193-
result = MkAncestorLookup(this.getAncestryTarget().getADirectDescendent*())
1193+
result = MkAncestorLookup(this.getAncestryTarget().getAnImmediateDescendent*())
11941194
or
11951195
access = any(ConstantAccess ac).getScopeExpr() and
11961196
result = MkQualifiedLookup(access)

0 commit comments

Comments
 (0)