HomePhorge

(#8778) Make '' == undef commutative in the DSL
a713f07a63cbUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#8778) Make '' == undef commutative in the DSL

Without this patch applied the Puppet DSL treats undef == '' as true
but '' == undef as false. This is undesirable because the equality
operator should be commutative.

This patch fixes the problem by adding an explicit check for '' == undef
in the AST. Without this patch applied, Puppet already has an explicit
check for undef == '' but not for '' == undef.

The spec tests are also updated by this patch to reflect the change.

Details

Provenance
Jeff McCune <jeff@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU24d4bb51d07f: Revert "(#11004) Fix regex for pkg provider line matching"
Branches
Unknown
Tags
Unknown

Event Timeline

Jeff McCune <jeff@puppetlabs.com> committed rPUa713f07a63cb: (#8778) Make '' == undef commutative in the DSL (authored by Jeff McCune <jeff@puppetlabs.com>).Apr 30 2012, 6:46 PM