]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Clarify what an empty intersection looks like.
authorBen Ford <ben.ford@puppetlabs.com>
Mon, 14 Sep 2015 18:25:38 +0000 (11:25 -0700)
committerBen Ford <ben.ford@puppetlabs.com>
Mon, 14 Sep 2015 18:25:38 +0000 (11:25 -0700)
lib/puppet/parser/functions/intersection.rb

index 48f02e9d3794d61f1139b6bd165c12ca43f7702d..bfbb4babbddafebcc1a9b8c5095330b12fb68cbf 100644 (file)
@@ -4,13 +4,13 @@
 
 module Puppet::Parser::Functions
   newfunction(:intersection, :type => :rvalue, :doc => <<-EOS
-This function returns an array an intersection of two.
+This function returns an array of the intersection of two.
 
 *Examples:*
 
-    intersection(["a","b","c"],["b","c","d"])
+    intersection(["a","b","c"],["b","c","d"])  # returns ["b","c"]
+    intersection(["a","b","c"],[1,2,3,4])      # returns [] (true, when evaluated as a Boolean)
 
-Would return: ["b","c"]
     EOS
   ) do |arguments|