]> gitweb.fluxo.info Git - puppet-common.git/commitdiff
go on uniq strings
authormh <mh@immerda.ch>
Wed, 20 Oct 2010 23:05:22 +0000 (01:05 +0200)
committerMicah Anderson <micah@riseup.net>
Sun, 7 Nov 2010 18:37:27 +0000 (13:37 -0500)
Looks like puppet has some internal representation which
is not comparable.

lib/puppet/parser/functions/uniq_flatten.rb

index a4cae403b9b333a4a89fc01e440a5f4d1a0eac9d..4841c4dde5658bcb95a5645d0d590b8d50c92aac 100644 (file)
@@ -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