HomePhorge

Fix #4238 - if should match undef as ''
b509032e559cUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix #4238 - if should match undef as ''

The comparisons operator (and more particularly == and !=) were not treating
the undef value as '', like case and selector did since #2818.

This patch makes sure comparison operator uses AST leaf matching.

Unfortunately, doing this introduces a behavior change compared to
the previous versions:
Numbers embedded in strings will now be matched as numbers in case and
selector statements instead of string matching.

Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>

Details

Provenance
Brice Figureau <brice-puppet@daysofwonder.com>Authored on
Markus Roberts <Markus@reality.com>Committed on Jul 19 2010, 4:44 AM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU8c8c1469ae9f: Minimal fix for #4243 -- import isn't thread safe
Branches
Unknown
Tags
Unknown

Event Timeline

Markus Roberts <Markus@reality.com> committed rPUb509032e559c: Fix #4238 - if should match undef as '' (authored by Brice Figureau <brice-puppet@daysofwonder.com>).Jul 19 2010, 4:44 AM