Skip to content

Commit ee8e018

Browse files
committed
remove redundant call, the charpred ensures it always holds
1 parent 360a99f commit ee8e018

File tree

1 file changed

+3
-6
lines changed
  • ruby/ql/lib/codeql/ruby/ast/internal

1 file changed

+3
-6
lines changed

ruby/ql/lib/codeql/ruby/ast/internal/Call.qll

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,9 @@ class RegularMethodCall extends MethodCallImpl, TRegularMethodCall {
7878
}
7979

8080
final override string getMethodNameImpl() {
81-
isRegularMethodCall(g) and
82-
(
83-
result = "call" and not exists(g.getMethod())
84-
or
85-
result = g.getMethod().(Ruby::Token).getValue()
86-
)
81+
result = "call" and not exists(g.getMethod())
82+
or
83+
result = g.getMethod().(Ruby::Token).getValue()
8784
}
8885

8986
final override Expr getArgumentImpl(int n) { toGenerated(result) = g.getArguments().getChild(n) }

0 commit comments

Comments
 (0)