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) {
309309}
310310
311311private 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+ )
314320}
315321
316322private Callable viableSourceCallableInit ( RelevantCall call ) { result = getInitializeTarget ( call ) }
@@ -400,14 +406,7 @@ private module Cached {
400406
401407 cached
402408 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 )
411410 or
412411 result = blockCall ( call )
413412 }
You can’t perform that action at this time.
0 commit comments