summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/node.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/ast/node.rb')
-rw-r--r--lib/puppet/parser/ast/node.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/puppet/parser/ast/node.rb b/lib/puppet/parser/ast/node.rb
index 2e68cbdb3..2a8e6a85b 100644
--- a/lib/puppet/parser/ast/node.rb
+++ b/lib/puppet/parser/ast/node.rb
@@ -39,6 +39,10 @@ class Puppet::Parser::AST
# And then evaluate our code.
@code.safeevaluate(:scope => scope)
+ # Mark our node name as a class, too, but strip it of the domain
+ # name.
+ scope.setclass(self.object_id, @type.sub(/\..+/, ''))
+
return scope
end