lib/rdoc/servlet.rb in rdoc-6.2.1 vs lib/rdoc/servlet.rb in rdoc-6.3.0
- old
+ new
@@ -1,10 +1,15 @@
# frozen_string_literal: true
require 'rdoc'
require 'erb'
require 'time'
require 'json'
-require 'webrick'
+
+begin
+ require 'webrick'
+rescue LoadError
+ abort "webrick is not found. You may need to `gem install webrick` to install webrick."
+end
##
# This is a WEBrick servlet that allows you to browse ri documentation.
#
# You can show documentation through either `ri --server` or, with RubyGems