Ruby: use getAnAncestor

This commit is contained in:
Harry Maclean
2023-01-30 21:21:38 +13:00
parent 708e303c01
commit 5e9210fcea

View File

@@ -124,14 +124,8 @@ module Filters {
*/
Callable getFilterCallable(string name) {
result.(MethodBase).getName() = name and
// Method in same class
(
result.getEnclosingModule() = this.getExpr().getEnclosingModule()
or
// Method in superclass
result.getEnclosingModule().getModule() =
this.getExpr().getEnclosingModule().getModule().getSuperClass()
)
result.getEnclosingModule().getModule() =
this.getExpr().getEnclosingModule().getModule().getAnAncestor()
}
}