Skip to content

Instantly share code, notes, and snippets.

@masterzen
Created October 14, 2009 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masterzen/210179 to your computer and use it in GitHub Desktop.
Save masterzen/210179 to your computer and use it in GitHub Desktop.
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb
index b8aaf27..00af282 100644
--- a/lib/puppet/parser/resource.rb
+++ b/lib/puppet/parser/resource.rb
@@ -131,6 +131,10 @@ class Puppet::Parser::Resource
raise ArgumentError, "Resources require a type and title"
end
+ if title.is_a?(String) and title.empty?
+ raise Puppet::ParseError.new("Empty title", options[:line], options[:file])
+ end
+
@ref = Reference.new(:type => type, :title => title, :scope => self.scope)
@params = {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment