aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/markup
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2022-02-20 20:45:53 +0900
committergit <svn-admin@ruby-lang.org>2022-02-22 17:08:52 +0900
commitae8a8b184e6d7400470669ed7557842902019d36 (patch)
tree29512791d28b3770d312eb46d89d18514a3f9e9b /lib/rdoc/markup
parenta49aae2c5e3786e5ac9a879772e53a6a731ec12f (diff)
downloadruby-ae8a8b184e6d7400470669ed7557842902019d36.tar.gz
[ruby/rdoc] Prefer `require 'cgi/util'` instead of `require 'cgi'`
RDoc is using only CGI.escape, escapeHTML, and unescape. We don't have to load the whole source code of cgi gem. https://github.com/ruby/rdoc/commit/d096222cc2
Diffstat (limited to 'lib/rdoc/markup')
-rw-r--r--lib/rdoc/markup/to_html.rb2
-rw-r--r--lib/rdoc/markup/to_label.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/rdoc/markup/to_html.rb b/lib/rdoc/markup/to_html.rb
index d3bb8af835..7c2e91cecf 100644
--- a/lib/rdoc/markup/to_html.rb
+++ b/lib/rdoc/markup/to_html.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'cgi'
+require 'cgi/util'
##
# Outputs RDoc markup as HTML.
diff --git a/lib/rdoc/markup/to_label.rb b/lib/rdoc/markup/to_label.rb
index 3d95ccc2e2..aa1dbcf2a1 100644
--- a/lib/rdoc/markup/to_label.rb
+++ b/lib/rdoc/markup/to_label.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'cgi'
+require 'cgi/util'
##
# Creates HTML-safe labels suitable for use in id attributes. Tidylinks are