diff options
author | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-30 01:00:10 +0100 |
---|---|---|
committer | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-30 01:00:10 +0100 |
commit | 3b55113c7321376882f4d158bfcca380706330a2 (patch) | |
tree | 0914a358b2161e7294b77a8544e26586cbcd6466 | |
parent | 21e39aaeac2fb545b80a47f55f5e77a2872f65fc (diff) | |
download | puppet-stdlib-3b55113c7321376882f4d158bfcca380706330a2.tar.gz puppet-stdlib-3b55113c7321376882f4d158bfcca380706330a2.tar.bz2 |
Moved to unless from if not and changed wording of few error messages.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
-rw-r--r-- | type.rb | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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' |