File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
ruby/ql/lib/codeql/ruby/dataflow/internal Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -309,8 +309,14 @@ predicate isUserDefinedNew(SingletonMethod new) {
309
309
}
310
310
311
311
private Callable viableSourceCallableNonInit ( RelevantCall call ) {
312
- result = getTarget ( call ) and
313
- not result = blockCall ( call ) // handled by `lambdaCreation`/`lambdaCall`
312
+ result = getTargetInstance ( call , _)
313
+ or
314
+ result = getTargetSingleton ( call , _)
315
+ or
316
+ exists ( Module cls , string method |
317
+ superCall ( call , cls , method ) and
318
+ result = lookupMethod ( cls .getAnImmediateAncestor ( ) , method )
319
+ )
314
320
}
315
321
316
322
private Callable viableSourceCallableInit ( RelevantCall call ) { result = getInitializeTarget ( call ) }
@@ -400,14 +406,7 @@ private module Cached {
400
406
401
407
cached
402
408
CfgScope getTarget ( RelevantCall call ) {
403
- result = getTargetInstance ( call , _)
404
- or
405
- result = getTargetSingleton ( call , _)
406
- or
407
- exists ( Module cls , string method |
408
- superCall ( call , cls , method ) and
409
- result = lookupMethod ( cls .getAnImmediateAncestor ( ) , method )
410
- )
409
+ result = viableSourceCallableNonInit ( call )
411
410
or
412
411
result = blockCall ( call )
413
412
}
You can’t perform that action at this time.
0 commit comments