summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/update_command.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2021-01-04 10:09:05 +0900
committerHiroshi SHIBATA <[email protected]>2021-01-04 13:14:43 +0900
commit5537adf719a37a30b17d39111cc03700f353aa2d (patch)
tree7523de9950b8a0118143f4ee0029aee17d043e04 /lib/rubygems/commands/update_command.rb
parent35c3a24c8cbcccff1108079360e2063fc354b4bd (diff)
Track RubyGems master(3.3.0.dev) branch at 55634a8af18a52df86c4275d70fa1179118bcc20
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4021
Diffstat (limited to 'lib/rubygems/commands/update_command.rb')
-rw-r--r--lib/rubygems/commands/update_command.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index fcc52c293e..41770d9805 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -19,9 +19,13 @@ class Gem::Commands::UpdateCommand < Gem::Command
attr_reader :updated # :nodoc:
def initialize
- super 'update', 'Update installed gems to the latest version',
- :document => %w[rdoc ri],
- :force => false
+ options = {
+ :force => false,
+ }
+
+ options.merge!(install_update_options)
+
+ super 'update', 'Update installed gems to the latest version', options
add_install_update_options
@@ -51,7 +55,8 @@ class Gem::Commands::UpdateCommand < Gem::Command
end
def defaults_str # :nodoc:
- "--document --no-force --install-dir #{Gem.dir}"
+ "--no-force --install-dir #{Gem.dir}\n" +
+ install_update_defaults_str
end
def description # :nodoc: