Get rid of some ruby warnings due to shadowed variables

This commit is contained in:
Mitchell Hashimoto 2012-11-06 21:12:15 -08:00
parent e8370f0098
commit 78a1e5726e
1 changed files with 10 additions and 10 deletions

View File

@ -53,13 +53,13 @@ module Vagrant
# We use the optionparser for this. Its just easier. We don't use # We use the optionparser for this. Its just easier. We don't use
# an optionparser above because I don't think the performance hits # an optionparser above because I don't think the performance hits
# of creating a whole object are worth checking only a couple flags. # of creating a whole object are worth checking only a couple flags.
opts = OptionParser.new do |opts| opts = OptionParser.new do |o|
opts.banner = "Usage: vagrant [-v] [-h] command [<args>]" o.banner = "Usage: vagrant [-v] [-h] command [<args>]"
opts.separator "" o.separator ""
opts.on("-v", "--version", "Print the version and exit.") o.on("-v", "--version", "Print the version and exit.")
opts.on("-h", "--help", "Print this help.") o.on("-h", "--help", "Print this help.")
opts.separator "" o.separator ""
opts.separator "Available subcommands:" o.separator "Available subcommands:"
# Add the available subcommands as separators in order to print them # Add the available subcommands as separators in order to print them
# out as well. # out as well.
@ -69,11 +69,11 @@ module Vagrant
end end
keys.sort.each do |key| keys.sort.each do |key|
opts.separator " #{key}" o.separator " #{key}"
end end
opts.separator "" o.separator ""
opts.separator "For help on any individual command run `vagrant COMMAND -h`" o.separator "For help on any individual command run `vagrant COMMAND -h`"
end end
@env.ui.info(opts.help, :prefix => false) @env.ui.info(opts.help, :prefix => false)