diff options
Diffstat (limited to 'lib/rubygems/commands/server_command.rb')
-rw-r--r-- | lib/rubygems/commands/server_command.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rubygems/commands/server_command.rb b/lib/rubygems/commands/server_command.rb index f8cad3b5db..f1dde4aa02 100644 --- a/lib/rubygems/commands/server_command.rb +++ b/lib/rubygems/commands/server_command.rb @@ -1,12 +1,13 @@ # frozen_string_literal: true -require_relative '../command' + +require_relative "../command" unless defined? Gem::Commands::ServerCommand class Gem::Commands::ServerCommand < Gem::Command def initialize - super('server', 'Starts up a web server that hosts the RDoc (requires rubygems-server)') + super("server", "Starts up a web server that hosts the RDoc (requires rubygems-server)") begin - Gem::Specification.find_by_name('rubygems-server').activate + Gem::Specification.find_by_name("rubygems-server").activate rescue Gem::LoadError # no-op end |