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

Predicate AccessPath::parseIntWithArity

Parses an integer constant or interval (bounded or unbounded) that may reference the arity of a call, such as N-1 or N-3..N-1.

Note that expressions of form N-x will never resolve to a negative index, even if N is zero (it will have no result in that case).

Import path

import codeql.dataflow.internal.AccessPathSyntax
int parseIntWithArity(string arg, int arity)