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

Member predicate BasicBlock::dominates

Holds if this basic block dominates basic block bb.

That is, all paths reaching basic block bb from some entry point basic block must go through this basic block.

Example:

def m b
  if b
    return 0
  end
  return 1
end

The basic block starting on line 2 dominates the basic basic block on line 5 (all paths from the entry point of m to return 1 must go through the if block).

predicate dominates(BasicBlock bb)