Flowdock
method

update_gem

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: UpdateCommand
update_gem(name, version = Gem::Requirement.default) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/commands/update_command.rb, line 100
  def update_gem name, version = Gem::Requirement.default
    return if @updated.any? { |spec| spec.name == name }
    success = false

    say "Updating #{name}"
    begin
      @installer.install name, version
      success = true
    rescue Gem::InstallError => e
      alert_error "Error installing #{name}:\n\t#{e.message}"
      success = false
    end

    @installer.installed_gems.each do |spec|
      @updated << spec
      say "Successfully installed #{spec.full_name}" if success
    end
  end
Register or log in to add new notes.