1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use abort(message) instead of puts and exit

This commit is contained in:
Kazuhiro NISHIYAMA 2020-12-10 21:04:57 +09:00
parent 78f188524f
commit d5dfc3f2c8
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A
4 changed files with 4 additions and 8 deletions

View file

@ -1554,8 +1554,7 @@ or the PAGER environment variable.
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

View file

@ -7,8 +7,7 @@ require 'json'
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
##

View file

@ -431,8 +431,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
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

View file

@ -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|