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

Member predicate CaseExpr::getValue

Gets the expression being compared. For example, foo in the following example.

case foo
when 0
  puts 'zero'
when 1
  puts 'one'
end

In the following example, the result is an implicit synthesized true literal.

case
when a then 0
when b then 1
else        2
end
Expr getValue()