summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorLuke Kanies <luke@puppetlabs.com>2010-05-19 23:13:36 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit938fbe914a811b10146f817368883df8180ef224 (patch)
tree4828b0ff61496038cbe3c423a90595ab339e7a1c /lib/puppet/parser
parent49cf2f216ecbe924978421eac3c6c4fafb642874 (diff)
Removing obsolete nodescope concept
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/scope.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index c974aee78..bb548dd47 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -19,7 +19,7 @@ class Puppet::Parser::Scope
include Enumerable
include Puppet::Util::Errors
attr_accessor :level, :source, :resource
- attr_accessor :base, :keyword, :nodescope
+ attr_accessor :base, :keyword
attr_accessor :top, :translated, :compiler
attr_accessor :parent
attr_reader :namespaces
@@ -176,13 +176,6 @@ class Puppet::Parser::Scope
# the scope in which it was evaluated, so that we can look it up later.
def class_set(name, scope)
return parent.class_set(name,scope) if parent
- if existing = @class_scopes[name]
- if existing.nodescope? != scope.nodescope?
- raise Puppet::ParseError, "Cannot have classes, nodes, or definitions with the same name"
- else
- raise Puppet::DevError, "Somehow evaluated %s %s twice" % [ existing.nodescope? ? "node" : "class", name]
- end
- end
@class_scopes[name] = scope
end
@@ -298,14 +291,6 @@ class Puppet::Parser::Scope
compiler.newscope(self, options)
end
- # Is this class for a node? This is used to make sure that
- # nodes and classes with the same name conflict (#620), which
- # is required because of how often the names are used throughout
- # the system, including on the client.
- def nodescope?
- self.nodescope
- end
-
def parent_module_name
return nil unless @parent
return nil unless @parent.source