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

Predicate TypeInference::asModulePattern

Holds if SSA definition def belongs to a variable introduced via pattern matching on type m. For example, in

case object
  in C => c then c.foo
end

the SSA definition for c is introduced by matching on C.

Import path

import codeql.ruby.dataflow.internal.DataFlowPrivate
predicate asModulePattern(WriteDefinition def, Module m)