Issue #1705 has been updated by luke.
Status changed from Unreviewed to Rejected
Even if you were to delete empty strings from the array, you'd need to do
<code>rets.delete!("")</code>; or better yet:
<pre>
return rets.delete("").compact
</pre>
I'm not really sure this is a good idea. Isn't there at least the possibility
that we'd want to have empty items? For instance, what if you want to set the
file content to an empty string? I think this would break that.
I'd rather stick with 'undef' meaning "remove this value", but the empty string
being a valid value.
----------------------------------------
Bug #1705: AST::ASTArray needs to check for empty elements as well as nil
elements when flattening
http://projects.reductivelabs.com/issues/show/1705
Author: rgsteele
Status: Rejected
Priority: Normal
Assigned to:
Category:
Target version:
Complexity: Unknown
Affected version: 0.24.6
Keywords:
This manifest:
#!/usr/bin/env puppet
$groups = ["foo", "bar", ""]
$groups2 = ["baz", "quux"]
$user_groups = [$groups, $groups2]
notify { $user_groups: }
Returns this output:
notice: quux
notice: foo
notice: baz
notice: bar
notice:
Ideally, it should not return that empty element. We can just add this before
returning rets.reject on line 36 to fix it:
36 rets.delete('')
37 return rets.reject { |o| o.nil? }
----------------------------------------
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---