]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Moved to unless from if not and changed wording of few error messages.
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Sat, 30 Apr 2011 00:00:10 +0000 (01:00 +0100)
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Sat, 30 Apr 2011 00:00:10 +0000 (01:00 +0100)
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
type.rb

diff --git a/type.rb b/type.rb
index ac1895c064e95f1d89319e9d6f657ffdc277b9e2..3051de68737bc2af17785826e94e2dd4facd9447 100644 (file)
--- a/type.rb
+++ b/type.rb
@@ -14,17 +14,18 @@ module Puppet::Parser::Functions
 
     klass = value.class
 
-    if not [Array, Bignum, Fixnum, FalseClass,
-      Float, Hash, String, TrueClass].include?(klass)
+    # This should cover all the generic types present in Puppet at present ...
+    unless [Array, Bignum, Fixnum, FalseClass,
+            Float, Hash, String, TrueClass].include?(klass)
 
-      raise(Puppet::ParseError, 'type(): Unknown type')
+      raise(Puppet::ParseError, 'type(): Unknown type given')
     end
 
     klass = klass.to_s # Ugly ...
 
     #
     # We note that Integer is the parent to Bignum and Fixnum ...
-    # Plus we say Boolean for FalseClass and TrueClass ...
+    # Plus we claim name Boolean for FalseClass and TrueClass ...
     #
     result = case klass
       when /^(?:Big|Fix)num$/      then 'Integer'