summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
authorAlex Cline <acline@us.ibm.com>2013-05-06 16:16:38 -0400
committerAlex Cline <acline@us.ibm.com>2013-05-06 16:16:38 -0400
commitd38bce0488dd70a6f8a8a2c9b91a98a231f28f02 (patch)
tree4c963a169f2fd82f99ffbb8128a2cf862f46e338 /lib/puppet
parentb33cc24a3ce4da19ae89c59985c809a5790de291 (diff)
downloadpuppet-stdlib-d38bce0488dd70a6f8a8a2c9b91a98a231f28f02.tar.gz
puppet-stdlib-d38bce0488dd70a6f8a8a2c9b91a98a231f28f02.tar.bz2
Terser method of string to array conversion courtesy of ethooz.
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/functions/ensure_resource.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/ensure_resource.rb b/lib/puppet/parser/functions/ensure_resource.rb
index 36c423a..a9a1733 100644
--- a/lib/puppet/parser/functions/ensure_resource.rb
+++ b/lib/puppet/parser/functions/ensure_resource.rb
@@ -31,7 +31,7 @@ ENDOFDOC
raise(ArgumentError, 'Must specify a title') unless title
params ||= {}
- items = title.kind_of?(Array) ? title : [title]
+ items = [title].flatten
items.each do |item|
Puppet::Parser::Functions.function(:defined_with_params)