| Class | Puppet::Parser::AST::Regex |
| In: |
lib/puppet/parser/ast/leaf.rb
|
| Parent: | AST::Leaf |
we‘re returning self here to wrap the regexp and to be used in places where a string would have been used, without modifying any client code. For instance, in many places we have the following code snippet:
val = @val.safeevaluate(@scope)
if val.match(otherval)
...
end
this way, we don‘t have to modify this test specifically for handling regexes.