summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/hostclass.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/ast/hostclass.rb')
-rw-r--r--lib/puppet/parser/ast/hostclass.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/puppet/parser/ast/hostclass.rb b/lib/puppet/parser/ast/hostclass.rb
index 526265c1c..5416c1071 100644
--- a/lib/puppet/parser/ast/hostclass.rb
+++ b/lib/puppet/parser/ast/hostclass.rb
@@ -12,10 +12,10 @@ class Puppet::Parser::AST
def child_of?(klass)
return false unless self.parentclass
- if klass == self.parentclass
+ if klass == self.parentobj
return true
else
- return self.parentclass.child_of?(klass)
+ return self.parentobj.child_of?(klass)
end
end
@@ -31,15 +31,11 @@ class Puppet::Parser::AST
end
pnames = nil
- if @parentclass
- if pklass = self.parentclass
- pklass.safeevaluate :scope => scope
+ if pklass = self.parentobj
+ pklass.safeevaluate :scope => scope
- scope = parent_scope(scope, pklass)
- pnames = scope.namespaces
- else
- parsefail "Could not find class %s" % @parentclass
- end
+ scope = parent_scope(scope, pklass)
+ pnames = scope.namespaces
end
unless hash[:nosubscope]