From: Krzysztof Wilczynski Date: Sat, 12 Mar 2011 23:15:02 +0000 (+0000) Subject: Small re-factor. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=00a4c4ebcc67fc2efebc91090ece63e491fbd7b8;p=puppet-stdlib.git Small re-factor. --- diff --git a/load_vars.rb b/load_vars.rb index 02e99a0..ddfc0ef 100644 --- a/load_vars.rb +++ b/load_vars.rb @@ -42,12 +42,8 @@ module Puppet::Parser::Functions newfunction(:load_vars, :type => :statement) do |arguments| - number_of_arguments = arguments.size - - if number_of_arguments < 2 - raise(Puppet::ParseError, "Wrong number of arguments " + - "given (#{number_of_arguments} for 2)") - end + raise(Puppet::ParseError, "Wrong number of arguments " + + "given (#{arguments.size} for 2)") if arguments.size < 2 data = {}