mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Revert "Ruby: Fix performance of Filter.getAnAction"
This reverts commit f6c863c13bc840cba983ed12232725b8a8552cb4.
This commit is contained in:
committed by
Harry Maclean
parent
710ddb1f96
commit
9880952e72
@@ -65,14 +65,13 @@ module Filters {
|
||||
not exists(this.getOnlyArgument()) and
|
||||
forall(string except | except = this.getExceptArgument() | result.getName() != except)
|
||||
) and
|
||||
// This is a simple heuristic and will miss some cases.
|
||||
(
|
||||
// The action is in the same class as this call
|
||||
result = lookupMethod(this.getExpr().getEnclosingModule().getModule(), _)
|
||||
result = this.getExpr().getEnclosingModule().getAMethod()
|
||||
or
|
||||
// or the action is in an immediate subclass of this call
|
||||
result.getEnclosingModule().getModule().getAnImmediateAncestor() =
|
||||
this.getExpr().getEnclosingModule().getModule()
|
||||
exists(ModuleBase m |
|
||||
m.getModule() = this.getExpr().getEnclosingModule().getModule().getADescendent() and
|
||||
result = m.getAMethod()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user