From: mh Date: Wed, 20 Oct 2010 23:05:22 +0000 (+0200) Subject: go on uniq strings X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=218c68752e3096b79cc9dc2a8749b9776715ade8;p=puppet-common.git go on uniq strings Looks like puppet has some internal representation which is not comparable. --- diff --git a/lib/puppet/parser/functions/uniq_flatten.rb b/lib/puppet/parser/functions/uniq_flatten.rb index a4cae40..4841c4d 100644 --- a/lib/puppet/parser/functions/uniq_flatten.rb +++ b/lib/puppet/parser/functions/uniq_flatten.rb @@ -6,5 +6,5 @@ Puppet::Parser::Functions::newfunction( Example: uniq_flatten([['a','b'],'a']) -> ['a','b']" ) do |args| raise Puppet::ParseError, 'uniq_flatten() needs one arguments' if args.length != 1 - args[0].to_a.flatten.uniq + args[0].to_a.flatten.collect(&:to_s).uniq end