From ff1fb427348e3e19acc324e851a1ad0e49867d0a Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 7 Dec 2010 13:29:49 +0000 Subject: [PATCH] * lib/optparse.rb (OptionParser::Completion#candidate), (OptionParser::Switch#compsys): remove unused variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/optparse.rb | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7f066f6e2..83c6aa4d95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Dec 7 22:29:45 2010 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Completion#candidate), + (OptionParser::Switch#compsys): remove unused variables. + Tue Dec 7 22:05:25 2010 Nobuyoshi Nakada * transcode.c (transcode_loop): call default handler of the given diff --git a/lib/optparse.rb b/lib/optparse.rb index 259aa06aa9..b2c9526598 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -229,7 +229,6 @@ class OptionParser def self.candidate(key, icase = false, pat = nil, &block) pat ||= Completion.regexp(key, icase) - canon, sw, cn = nil candidates = [] block.call do |k, *v| (if Regexp === k @@ -442,7 +441,7 @@ class OptionParser end def compsys(sdone, ldone) # :nodoc: - sopts, lopts, s = [], [], nil + sopts, lopts = [], [] @short.each {|s| sdone.fetch(s) {sopts << s}; sdone[s] = true} if @short @long.each {|s| ldone.fetch(s) {lopts << s}; ldone[s] = true} if @long return if sopts.empty? and lopts.empty? # completely hidden