summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/ast.rb')
-rw-r--r--lib/puppet/parser/ast.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/puppet/parser/ast.rb b/lib/puppet/parser/ast.rb
index 193f85eb1..d586a23f3 100644
--- a/lib/puppet/parser/ast.rb
+++ b/lib/puppet/parser/ast.rb
@@ -788,10 +788,13 @@ module Puppet
values = {}
super
- # this won't work if we move away from only allowing constants
- # here
- # but for now, it's fine and useful
+
+ # This won't work if we move away from only allowing
+ # constants here, but for now, it's fine and useful.
@options.each { |option|
+ unless option.is_a?(CaseOpt)
+ raise Puppet::DevError, "Option is not a CaseOpt"
+ end
if option.default?
@default = option
end