summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>2011-03-12 23:15:02 +0000
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>2011-03-12 23:15:02 +0000
commit00a4c4ebcc67fc2efebc91090ece63e491fbd7b8 (patch)
tree96d55824ee26b206fda6a3a7a839028883039b3b
parent0eea8ac101fdd6dbbe67c2406c3e742ae81a1c4c (diff)
downloadpuppet-stdlib-00a4c4ebcc67fc2efebc91090ece63e491fbd7b8.tar.gz
puppet-stdlib-00a4c4ebcc67fc2efebc91090ece63e491fbd7b8.tar.bz2
Small re-factor.
-rw-r--r--load_vars.rb8
1 files changed, 2 insertions, 6 deletions
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 = {}