summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/scope.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 7239feb17..394c46033 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -631,7 +631,7 @@ module Puppet::Parser
# hash. We store the object ID, not class name, so that we
# can support multiple unrelated classes with the same name.
def setclass(id, name)
- unless name =~ /^[a-z]\w*$/
+ unless name =~ /^[a-z][\w-]*$/
raise Puppet::ParseError, "Invalid class name '%s'" % name
end