Skip to content

Commit cd75de1

Browse files
znzaycabta
authored andcommitted
Use abort(message) instead of puts and exit
1 parent 202425f commit cd75de1

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/rdoc/ri/driver.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,8 +1554,7 @@ def start_server
15541554
begin
15551555
require 'webrick'
15561556
rescue LoadError
1557-
puts "webrick is not found. You may need to `gem install webrick` to install webrick."
1558-
exit
1557+
abort "webrick is not found. You may need to `gem install webrick` to install webrick."
15591558
end
15601559

15611560
server = WEBrick::HTTPServer.new :Port => @server

lib/rdoc/servlet.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
begin
88
require 'webrick'
99
rescue LoadError
10-
puts "webrick is not found. You may need to `gem install webrick` to install webrick."
11-
exit
10+
abort "webrick is not found. You may need to `gem install webrick` to install webrick."
1211
end
1312

1413
##

0 commit comments

Comments
 (0)