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

Member predicate DataFlow::CallNode::getKeywordArgumentIncludeHashArgument

Gets the data-flow node corresponding to the named argument of the call corresponding to this data-flow node, also including values passed with (pre Ruby 2.0) hash arguments.

Such hash arguments are tracked back to their source location within functions, but no inter-procedural analysis occurs.

This means all 3 variants below will be handled by this predicate:

foo(..., some_option: 42)
foo(..., { some_option: 42 })
options = { some_option: 42 }
foo(..., options)
Node getKeywordArgumentIncludeHashArgument(string name)