From ae8a8b184e6d7400470669ed7557842902019d36 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Sun, 20 Feb 2022 20:45:53 +0900 Subject: [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 --- lib/rdoc/markup/to_html.rb | 2 +- lib/rdoc/markup/to_label.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rdoc/markup') 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 -- cgit v1.2.3