(MODULES-905) Narrow the confinement in bool2str#258
Merged
apenney merged 2 commits intopuppetlabs:masterfrom May 16, 2014
mckern:enhancement/master/camelcasedembools
Merged
(MODULES-905) Narrow the confinement in bool2str#258apenney merged 2 commits intopuppetlabs:masterfrom mckern:enhancement/master/camelcasedembools
apenney merged 2 commits intopuppetlabs:masterfrom
mckern:enhancement/master/camelcasedembools
Conversation
Previously, bool2str() accepted a broad array of boolean values and bare strings, without any attempt to validate that the strings in any way resembled "true" or "false" (or any of the other values bool2num() accepts). This commit narrows the input confinement to TrueClass and FalseClass, which means that bool2str() will only interpolate strict boolean values now.
|
I hate to be a massive pain but can we add a test that proves it fails? :) |
Contributor
Author
|
Sure. It'll take me a little bit to circle back around to them but I'll throw it over the wall today. |
The extended spec tests validate that the common types of values that could be passed to bool2str() are rejected.
apenney
pushed a commit
that referenced
this pull request
May 16, 2014
(MODULES-905) Narrow the confinement in bool2str
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, bool2str() accepted a broad array of boolean values and
bare strings, without any attempt to validate that the strings in any
way resembled "true" or "false" (or any of the other values bool2num()
accepts). This commit narrows the input confinement to TrueClass and
FalseClass, which means that bool2str() will only interpolate
strict boolean values now.