Issue #1705 has been updated by josb.
Or use the more compact Array#compact: <pre> 37 return rets.compact </pre> ---------------------------------------- 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: Unreviewed 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 -~----------~----~----~----~------~----~------~--~---
