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

Member predicate Ssa::Definition::getAnUltimateDefinition

Gets a definition that ultimately defines this SSA definition and is not itself a phi node.

Example:

def m b
  i = 0        # defines i_0
  puts i
  puts i + 1
  if b
    i = 1      # defines i_1
    puts i
    puts i + 1
  else
    i = 2      # defines i_2
    puts i
    puts i + 1
  end
               # defines i_3 = phi(i_1, i_2); ultimate definitions are i_1 and i_2
  puts i
end
Definition getAnUltimateDefinition()