From a0c1edec69c7eea70fe1ca9f4e0e1dc6fc3d688b Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 8 Apr 2009 19:45:59 -0500 Subject: Modifying the Settings#handlearg prototype I'd made the argument no longer optional because I thought the method was rarely used, but it's used in puppetd a good bit. Signed-off-by: Luke Kanies --- lib/puppet/util/settings.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/puppet') diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb index f9b9345f3..6a94c0df2 100644 --- a/lib/puppet/util/settings.rb +++ b/lib/puppet/util/settings.rb @@ -134,7 +134,7 @@ class Puppet::Util::Settings end # Handle a command-line argument. - def handlearg(opt, value) + def handlearg(opt, value = nil) @cache.clear value = munge_value(value) if value str = opt.sub(/^--/,'') @@ -146,7 +146,7 @@ class Puppet::Util::Settings end str = str.intern - if value == "" + if value == "" or value.nil? value = bool end -- cgit