diff options
Diffstat (limited to 'lib/puppet/parser/ast/leaf.rb')
-rw-r--r-- | lib/puppet/parser/ast/leaf.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/puppet/parser/ast/leaf.rb b/lib/puppet/parser/ast/leaf.rb index 6ef346123..666edd66a 100644 --- a/lib/puppet/parser/ast/leaf.rb +++ b/lib/puppet/parser/ast/leaf.rb @@ -162,9 +162,7 @@ class Puppet::Parser::AST def evaluate(scope) object = evaluate_container(scope) - unless object.is_a?(Hash) or object.is_a?(Array) - raise Puppet::ParseError, "#{variable} is not an hash or array when accessing it with #{accesskey}" - end + raise Puppet::ParseError, "#{variable} is not an hash or array when accessing it with #{accesskey}" unless object.is_a?(Hash) or object.is_a?(Array) return object[evaluate_key(scope)] end |