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 a4cae40..4841c4d 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