Skip to content

(PUP-3505) Fix problem with passing explicit undef res parameter#3229

Merged
zaphod42 merged 1 commit intopuppetlabs:stablefrom
hlindberg:PUP-3505_given-undef-not-considered-missing
Oct 24, 2014
Merged

(PUP-3505) Fix problem with passing explicit undef res parameter#3229
zaphod42 merged 1 commit intopuppetlabs:stablefrom
hlindberg:PUP-3505_given-undef-not-considered-missing

Conversation

@hlindberg
Copy link
Contributor

With the future parser in effect and a resource attribute is undef the
logic that checks for missing arguments did not report the parameter.
This in turn led to that the logic that either fails the operation, or
assigns the default value to completely skip that parameter/argument.
Subsequently a reference of that parameter ended up picking the same
variable from an outer context.

The fix is to equate a nil value (4x) with an :undef value (for 3x) when
computing the missing arguments.

A test is added that tests the functionality.

With the future parser in effect and a resource attribute is undef the
logic that checks for missing arguments did not report the parameter.
This in turn led to that the logic that either fails the operation, or
assigns the default value to completely skip that parameter/argument.
Subsequently a reference of that parameter ended up picking the same
variable from an outer context.

The fix is to equate a nil value (4x) with an :undef value (for 3x) when
computing the missing arguments.

A test is added that tests the functionality.
@puppetcla
Copy link

CLA signed by all contributors.

zaphod42 added a commit that referenced this pull request Oct 24, 2014
…idered-missing

(PUP-3505) Fix problem with passing explicit undef res parameter
@zaphod42 zaphod42 merged commit 7832174 into puppetlabs:stable Oct 24, 2014
@hlindberg hlindberg deleted the PUP-3505_given-undef-not-considered-missing branch September 16, 2017 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants