|
This removes several unused methods and attributes from
Puppet::Parser::Scope. The only places in code using them where tests.
It also removes some "convenience"/"proxy" methods used by only the
Collector (better for it to do this on its own than cluttering
the Scope implementation)
Also refactors creating scopes for the purpose of running tests by
moving that logic from Scope to PuppetSpec::Scope that should be
included in examples to use the no(now renamed) method
Useless and tests that test that scope behaves the wrong ! way removed.
(It is always illegal to set match data variables from anything but a
match, but this functionality was tested by spec tests).
It was then much clearer how match scope and local scope should work.
Now a LocalScope always have a nested MatchScope that is transparent
until a match is set, or a nested MatchScope is created for an inner
scope. This enables rewriting the evaluator logic to not leak match
scopes where there is a sequence of matches at top level in a define or
class body.
|