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