qtil
advanced-security/qtil-ruby 0.0.2
Search

Predicate Cached::vcall

Holds if i is an identifier node occurring in the context where it should be considered a VCALL. VCALL is the term that MRI/Ripper uses internally when there’s an identifier without arguments or parentheses, i.e. it might be a method call, but it might also be a variable access, depending on the bindings in the current scope.

foo # in MRI this is a VCALL, and the predicate should hold for this
bar() # in MRI this would be an FCALL. Tree-sitter gives us a `call` node,
      # and the `method` field will be an `identifier`, but this predicate
      # will not hold for that identifier.

Import path

import codeql.ruby.ast.internal.Variable
predicate vcall(VcallToken i)