mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[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.
d096222cc2
This commit is contained in:
parent
a49aae2c5e
commit
ae8a8b184e
5 changed files with 5 additions and 5 deletions
|
@ -289,7 +289,7 @@ class RDoc::MethodAttr < RDoc::CodeObject
|
|||
# HTML id-friendly method/attribute name
|
||||
|
||||
def html_name
|
||||
require 'cgi'
|
||||
require 'cgi/util'
|
||||
|
||||
CGI.escape(@name.gsub('-', '-2D')).gsub('%','-').sub(/^-/, '')
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue