HomePhorge

(#12479) Don't make undef regexp match as the string undef.
2732f250886fUnpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

(#12479) Don't make undef regexp match as the string undef.

As part of commit 53869e99 we did work to make the behaviour of variables that
were explicitly undef at least somewhat saner.

One unintended side-effect of this was that we started matching undef as the
literal string undef, not as the empty string, and not "not matching".

Either of the later would have been sane things to do; this fixes that by
picking "match undef as empty string".

That is for consistency: we already match the *literal* empty string as equal
to undef, so it makes sense to treat it the same way for a regular expression.
(Debate on that point is welcome elsewhere, but we should change literal and
regexp matching the same, consistent way if we change it anywhere.)

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU2732f250886f: (#12479) Don't make undef regexp match as the string undef. (authored by Daniel Pittman <daniel@puppetlabs.com>).Feb 7 2012, 10:05 PM