CodeQL library for Ruby
codeql/ruby-all 0.8.15-dev (changelog, source)
Search

Predicate DataFlow::Content::getKnownElementIndex

Gets the constant value of e, which corresponds to a valid known element index. Unlike calling simply e.getConstantValue(), this excludes negative array indices.

Import path

import ruby
ConstantValue getKnownElementIndex(Expr e)