summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/update_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/commands/update_command.rb')
-rw-r--r--lib/rubygems/commands/update_command.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index 9e9bd088f2..b132089612 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -203,7 +203,10 @@ command to remove old versions.
def update_gem name, version = Gem::Requirement.default
return if @updated.any? { |spec| spec.name == name }
- @installer ||= Gem::DependencyInstaller.new options
+ update_options = options.dup
+ update_options[:prerelease] = version.prerelease?
+
+ @installer = Gem::DependencyInstaller.new update_options
say "Updating #{name}"
begin