]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Moved to unless from if not and removed TODO.
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Fri, 29 Apr 2011 23:58:37 +0000 (00:58 +0100)
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Fri, 29 Apr 2011 23:58:37 +0000 (00:58 +0100)
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
empty.rb

index 1db9b632c5a8368c3a4939201ab062e9c128602a..e78ebf01c39e4db7796690d3bfe38e9019d7817a 100644 (file)
--- a/empty.rb
+++ b/empty.rb
@@ -2,8 +2,6 @@
 # empty.rb
 #
 
-# TODO(Krzysztof Wilczynski): Support for hashes would be nice too ...
-
 module Puppet::Parser::Functions
   newfunction(:empty, :type => :rvalue, :doc => <<-EOS
     EOS
@@ -15,8 +13,8 @@ module Puppet::Parser::Functions
     value = arguments[0]
     klass = value.class
 
-    if not [Array, Hash, String].include?(klass)
-      raise(Puppet::ParseError, 'empty(): Requires either an ' +
+    unless [Array, Hash, String].include?(klass)
+      raise(Puppet::ParseError, 'empty(): Requires either ' +
         'array, hash or string to work with')
     end