]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Moved to unless from if not to improve code clarity. Changed
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Sat, 30 Apr 2011 01:49:15 +0000 (02:49 +0100)
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Sat, 30 Apr 2011 01:49:15 +0000 (02:49 +0100)
wording of few error messages.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
member.rb

index 73030d7f63a7e97ed37cd1096111c1eb398b60af..bb43a37a09ea0e73b0f9a8f3e44628bd8b347708 100644 (file)
--- a/member.rb
+++ b/member.rb
@@ -15,14 +15,14 @@ module Puppet::Parser::Functions
 
     array = arguments[0]
 
-    if not array.is_a?(Array)
-      raise(Puppet::ParseError, 'member(): Requires an array to work with')
+    unless array.is_a?(Array)
+      raise(Puppet::ParseError, 'member(): Requires array to work with')
     end
 
     item = arguments[1]
 
     raise(Puppet::ParseError, 'member(): You must provide item ' +
-      'to search for within given array') if item.empty?
+      'to search for within array given') if item.empty?
 
     result = array.include?(item)