-
Notifications
You must be signed in to change notification settings - Fork 581
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
(MODULES-1439) Adds any2bool function #601
Conversation
f03bf46
to
c5a6024
Compare
* Basically a combination of `string2bool` and `num2bool`
c5a6024
to
420f76d
Compare
Sure, that makes it work on puppet 3 and 4 the same way.
I think that puppi's purpose is different from stdlib's purpose, so example42 can do namespacing as needed similar to when functions migrate from other modules to stdlib. Thanks for catching that! |
|
+1 |
|
Thanks @petems ! |
|
Note that we need to call out the puppi incompatibility in the changelog for the next release. |
|
👍 |
| end | ||
|
|
||
| describe 'when testing stringy values that mean "false"' do | ||
| [ 'FALSE','', '0', 'f', 'n', 'false', 'no', 'undef', 'undefined', nil, :undef ].each do |value| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'off' would also be good :D
string2boolandnum2boolSo there's a request for this to be added to stdlib (https://tickets.puppetlabs.com/browse/MODULES-1439).
Questions:
any2boolas part of puppi, should we give this a different name?