Skip to content

Commit 5e9210f

Browse files
committed
Ruby: use getAnAncestor
1 parent 708e303 commit 5e9210f

File tree

1 file changed

+2
-8
lines changed
  • ruby/ql/lib/codeql/ruby/frameworks/actioncontroller

1 file changed

+2
-8
lines changed

ruby/ql/lib/codeql/ruby/frameworks/actioncontroller/Filters.qll

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,8 @@ module Filters {
124124
*/
125125
Callable getFilterCallable(string name) {
126126
result.(MethodBase).getName() = name and
127-
// Method in same class
128-
(
129-
result.getEnclosingModule() = this.getExpr().getEnclosingModule()
130-
or
131-
// Method in superclass
132-
result.getEnclosingModule().getModule() =
133-
this.getExpr().getEnclosingModule().getModule().getSuperClass()
134-
)
127+
result.getEnclosingModule().getModule() =
128+
this.getExpr().getEnclosingModule().getModule().getAnAncestor()
135129
}
136130
}
137131

0 commit comments

Comments
 (0)