HomePhorge

Scope[] now returns nil for undefined variables
bdc0f8716ae8Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Scope[] now returns nil for undefined variables

Given that we have the 'include?' method, this feature
is unnecessary, and it makes sense to convert to more
ruby-like behavior.

Any code that previously checked whether lookupvar
(or the new []) returned :undefined should now check
whether 'scope.include?(var)'. Thus, you can have
the same behavior, but it takes a bit different code
to get it.

Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>

Details

Provenance
Luke Kanies <luke@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU9662045bfe55: Fixing a failing test because of mismatched error string
Branches
Unknown
Tags
Unknown

Event Timeline

Luke Kanies <luke@puppetlabs.com> committed rPUbdc0f8716ae8: Scope[] now returns nil for undefined variables (authored by Luke Kanies <luke@puppetlabs.com>).Jul 15 2011, 8:52 PM