Skip to content

Commit

Permalink
Use abort(message) instead of puts and exit
Browse files Browse the repository at this point in the history
  • Loading branch information
znz committed Dec 10, 2020
1 parent 78f1885 commit d5dfc3f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions lib/rdoc/ri/driver.rb
Expand Up @@ -1554,8 +1554,7 @@ def start_server
begin
require 'webrick'
rescue LoadError
puts "webrick is not found. You may need to `gem install webrick` to install webrick."
exit
abort "webrick is not found. You may need to `gem install webrick` to install webrick."
end

server = WEBrick::HTTPServer.new :Port => @server
Expand Down
3 changes: 1 addition & 2 deletions lib/rdoc/servlet.rb
Expand Up @@ -7,8 +7,7 @@
begin
require 'webrick'
rescue LoadError
puts "webrick is not found. You may need to `gem install webrick` to install webrick."
exit
abort "webrick is not found. You may need to `gem install webrick` to install webrick."
end

##
Expand Down
3 changes: 1 addition & 2 deletions lib/rubygems/server.rb
Expand Up @@ -431,8 +431,7 @@ def initialize(gem_dirs, port, daemon, launch = nil, addresses = nil)
begin
require 'webrick'
rescue LoadError
puts "webrick is not found. You may need to `gem install webrick` to install webrick."
exit
abort "webrick is not found. You may need to `gem install webrick` to install webrick."
end

Gem::RDoc.load_rdoc
Expand Down
3 changes: 1 addition & 2 deletions lib/un.rb
Expand Up @@ -329,8 +329,7 @@ def httpd
begin
require 'webrick'
rescue LoadError
puts "webrick is not found. You may need to `gem install webrick` to install webrick."
exit
abort "webrick is not found. You may need to `gem install webrick` to install webrick."
end
opt = options[:RequestTimeout] and options[:RequestTimeout] = opt.to_i
[:Port, :MaxClients].each do |name|
Expand Down

0 comments on commit d5dfc3f

Please sign in to comment.