summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/scope.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-20 19:09:26 -0500
committerLuke Kanies <luke@madstop.com>2007-08-20 19:09:26 -0500
commit2a4e1011dbc244754f434f7eb97f3d41463e5cd4 (patch)
tree584fe59adee0d6057d41093d4c349eb7635de2bf /lib/puppet/parser/scope.rb
parent6467c21e15b8a28e627d1395f76fe8f42ee77d70 (diff)
downloadpuppet-2a4e1011dbc244754f434f7eb97f3d41463e5cd4.tar.gz
puppet-2a4e1011dbc244754f434f7eb97f3d41463e5cd4.tar.xz
puppet-2a4e1011dbc244754f434f7eb97f3d41463e5cd4.zip
All language tests now pass. I expect there are other failures elsewhere, but I want to commit this before delving into them. My method for fixing the tests was to do as little as possible, keeping the tests as bad or as good as they were before I started. Mostly this was about changing references to the interpreter into references to the parser (since that is where the new* methods are now for ast containers) and then dealing with the new config object and its relationship to scopes.
Diffstat (limited to 'lib/puppet/parser/scope.rb')
-rw-r--r--lib/puppet/parser/scope.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 808362858..527ed4dcd 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -21,7 +21,7 @@ class Puppet::Parser::Scope
# Proxy accessors
def host
- @configuration.host
+ @configuration.node.name
end
def interpreter
@configuration.interpreter
@@ -241,11 +241,11 @@ class Puppet::Parser::Scope
# can support multiple unrelated classes with the same name.
def setclass(klass)
if klass.is_a?(AST::HostClass)
- unless klass.classname
+ unless name = klass.classname
raise Puppet::DevError, "Got a %s with no fully qualified name" %
klass.class
end
- @configuration.class_set(klass.classname, self)
+ @configuration.class_set(name, self)
else
raise Puppet::DevError, "Invalid class %s" % klass.inspect
end