Use `abort(message)` instead of `puts` and `exit`

This commit is contained in:
Kazuhiro NISHIYAMA 2020-12-10 21:04:57 +09:00
Родитель 78f188524f
Коммит d5dfc3f2c8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 262ED8DBB4222F7A
4 изменённых файлов: 4 добавлений и 8 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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