summaryrefslogtreecommitdiff
path: root/lib/rubygems/command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/command.rb')
-rw-r--r--lib/rubygems/command.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb
index 3fc8a70a3e..9f22cb9e82 100644
--- a/lib/rubygems/command.rb
+++ b/lib/rubygems/command.rb
@@ -160,7 +160,7 @@ class Gem::Command
msg << ", here is why:\n"
errors.each { |x| msg << " #{x.wordy}\n" }
else
- if required_by and gem != required_by then
+ if required_by and gem != required_by
msg << " (required by #{required_by}) in any repository"
else
msg << " in any repository"
@@ -169,7 +169,7 @@ class Gem::Command
alert_error msg
- unless domain == :local then # HACK
+ unless domain == :local # HACK
suggestions = Gem::SpecFetcher.fetcher.suggest_gems_from_name gem_name
unless suggestions.empty?
@@ -184,7 +184,7 @@ class Gem::Command
def get_all_gem_names
args = options[:args]
- if args.nil? or args.empty? then
+ if args.nil? or args.empty?
raise Gem::CommandLineError,
"Please specify at least one gem name (e.g. gem build GEMNAME)"
end
@@ -214,12 +214,12 @@ class Gem::Command
def get_one_gem_name
args = options[:args]
- if args.nil? or args.empty? then
+ if args.nil? or args.empty?
raise Gem::CommandLineError,
"Please specify a gem name on the command line (e.g. gem build GEMNAME)"
end
- if args.size > 1 then
+ if args.size > 1
raise Gem::CommandLineError,
"Too many gem names (#{args.join(', ')}); please specify only one"
end
@@ -313,9 +313,9 @@ class Gem::Command
self.ui = ui = Gem::SilentUI.new
end
- if options[:help] then
+ if options[:help]
show_help
- elsif @when_invoked then
+ elsif @when_invoked
@when_invoked.call options
else
execute
@@ -451,7 +451,7 @@ class Gem::Command
# Adds a section with +title+ and +content+ to the parser help view. Used
# for adding command arguments and default arguments.
- def add_parser_run_info title, content
+ def add_parser_run_info(title, content)
return if content.empty?
@parser.separator nil
@@ -531,7 +531,7 @@ class Gem::Command
add_common_option('-V', '--[no-]verbose',
'Set the verbose level of output') do |value, options|
# Set us to "really verbose" so the progress meter works
- if Gem.configuration.verbose and value then
+ if Gem.configuration.verbose and value
Gem.configuration.verbose = 1
else
Gem.configuration.verbose = value