class RuboCop::AST::NodePattern::Compiler

def compile_wildcard(name)

def compile_wildcard(name)
  if name.empty?
    'true'
  elsif @unify.key?(name)
    # we have already seen a wildcard with this name before
    # so the value it matched the first time will already be stored
    # in a temp. check if this value matches the one stored in the temp
    "#{CUR_ELEMENT} == #{access_unify(name)}"
  else
    n = @unify[name] = "unify_#{name.gsub('-', '__')}"
    # double assign to avoid "assigned but unused variable"
    "(#{n} = #{CUR_ELEMENT}; " \
    "#{n} = #{n}; true)"
  end
end