Skip to content

Update docs of validate_string to reflect bug #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 17, 2014

Conversation

JimPanic
Copy link

@hunner
Copy link
Contributor

hunner commented Sep 16, 2014

It still appears to pass undef as strings on the future parser:

extern% puppet apply -e 'validate_string(undef)' --parser=future
Notice: Compiled catalog for extern.corp.puppetlabs.net in environment production in 0.44 seconds
Notice: Finished catalog run in 0.01 seconds

@zaphod42
Copy link
Contributor

Yes, functions written using the old API will still receive "" under the future parser. Functions written with the new API will get a ruby nil for undef.

@zaphod42
Copy link
Contributor

We didn't change the semantics of undef under the old API because we didn't want to break existing functions that might (perhaps inadvertently) be relying on getting "" instead of nil.

@JimPanic
Copy link
Author

It would be very much appreciated if this was reflected in the documentation.

hunner added a commit that referenced this pull request Sep 17, 2014
Update docs of validate_string to reflect bug
@hunner hunner merged commit b347cc8 into puppetlabs:master Sep 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants