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:
parent
78f188524f
commit
d5dfc3f2c8
4 changed files with 4 additions and 8 deletions
|
@ -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|
|
||||
|
|
Loading…
Add table
Reference in a new issue