puppetlabs/puppet — pull request #211 by masterzen (2011-11-12 15:11:53+00:00)
Title: (#6412) - hash/array access of inexistant value should be false

The truethiness test done in P::P::Scope.true? doesn't handle nil
values, because it is not valid as result of a puppet expression.

Unfortunately ruby hash['invalid'] or array[inexistant_index] returns
nil which then was considered as true in an if expression.
This patch makes sure :undef is returned in those cases.