]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
minor corrections to delete_values()
authorPaweł Tomulik <ptomulik@meil.pw.edu.pl>
Thu, 8 Aug 2013 14:56:32 +0000 (16:56 +0200)
committerPaweł Tomulik <ptomulik@meil.pw.edu.pl>
Thu, 8 Aug 2013 14:56:32 +0000 (16:56 +0200)
lib/puppet/parser/functions/delete_values.rb

index 2fcbd16cc54d141c96f1591ffe43e22176fbb6c2..17b9d375e9cc9bfc80644496da9bf5e0f8412c0e 100644 (file)
@@ -15,12 +15,11 @@ Would return: {'a'=>'A','c'=>'C','B'=>'D'}
           "delete_values(): Wrong number of arguments given " +
           "(#{arguments.size} of 2)") if arguments.size != 2
 
-    hash = arguments[0]
-    item = arguments[1]
+    hash, item = arguments
 
     if not hash.is_a?(Hash)
       raise(TypeError, "delete_values(): First argument must be a Hash. " + \
-                       "Given an" " argument of class #{hash.class}.") 
+                       "Given an argument of class #{hash.class}.") 
     end
     hash.delete_if { |key, val| item == val }
   end