diff options
Diffstat (limited to 'lib/rubygems/commands/server_command.rb')
-rw-r--r-- | lib/rubygems/commands/server_command.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rubygems/commands/server_command.rb b/lib/rubygems/commands/server_command.rb index 245156d50d..e91a8e5176 100644 --- a/lib/rubygems/commands/server_command.rb +++ b/lib/rubygems/commands/server_command.rb @@ -9,7 +9,7 @@ class Gem::Commands::ServerCommand < Gem::Command :port => 8808, :gemdir => [], :daemon => false OptionParser.accept :Port do |port| - if port =~ /\A\d+\z/ then + if port =~ /\A\d+\z/ port = Integer port raise OptionParser::InvalidArgument, "#{port}: not a port number" if port > 65535 @@ -84,4 +84,3 @@ You can set up a shortcut to gem server documentation using the URL: end end - |