summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/scope.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 67dcb1cb0..711655e44 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -82,10 +82,6 @@ class Puppet::Parser::Scope
compiler.catalog
end
- def environment
- compiler.environment
- end
-
# Proxy accessors
def host
@compiler.node.name
@@ -130,7 +126,7 @@ class Puppet::Parser::Scope
# Remove this when rebasing
def environment
- compiler ? compiler.environment : nil
+ compiler ? compiler.environment : Puppet::Node::Environment.new
end
def find_hostclass(name)
@@ -454,6 +450,6 @@ class Puppet::Parser::Scope
def extend_with_functions_module
extend Puppet::Parser::Functions.environment_module(Puppet::Node::Environment.root)
- extend Puppet::Parser::Functions.environment_module(environment)
+ extend Puppet::Parser::Functions.environment_module(environment) if environment != Puppet::Node::Environment.root
end
end