vendored/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb in bolt-0.7.0 vs vendored/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb in bolt-0.8.0
- old
+ new
@@ -176,9 +176,18 @@
create_local_scope_from(variable_bindings, scope)
evaluate(block_expr, scope)
end
end
+ # Implementation of case option matching.
+ #
+ # This is the type of matching performed in a case option, using == for every type
+ # of value except regular expression where a match is performed.
+ #
+ def match?(left, right)
+ @@compare_operator.match(left, right, nil)
+ end
+
protected
def lvalue_VariableExpression(o, scope)
# evaluate the name
evaluate(o.expr, scope)