mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Ruby: simplify predicate by using DataFlow::CallNode
This commit is contained in:
@@ -124,9 +124,9 @@ predicate removesFirstOccurence(StringSubstitutionCall sub, string str) {
|
||||
* Gets a method call where the receiver is the result of a string substitution
|
||||
* call.
|
||||
*/
|
||||
DataFlow::Node getAMethodCall(StringSubstitutionCall call) {
|
||||
DataFlow::CallNode getAMethodCall(StringSubstitutionCall call) {
|
||||
exists(DataFlow::Node receiver |
|
||||
receiver.asExpr() = result.asExpr().(ExprNodes::MethodCallCfgNode).getReceiver() and
|
||||
receiver = result.getReceiver() and
|
||||
(
|
||||
// for a non-destructive string substitution, is there flow from it to the
|
||||
// receiver of another method call?
|
||||
|
||||
Reference in New Issue
Block a user