[DOC] Improve CGI.escape* docs#15709
Conversation
|
The following files are maintained in the following upstream repositories: Please file a pull request to the above instead. Thank you! |
3fd9ff9 to
05e2a3b
Compare
| # frozen_string_literal: true | ||
|
|
||
| # :stopdoc | ||
| # Since Ruby 4.0, \CGI is a small holder for various escaping methods, included from CGI::Escape |
There was a problem hiding this comment.
NB: I understand we mostly avoid mentioning Ruby versions in docs, but I believe such a huge change deserves a reference. At least those coming to docs from previous versions of Ruby, might guess what happened; and newcomers who question the existence of the whole (somewhat unfamiliarly named) CGI module with only one nested, might catch a hint is "that's how it is now". But I am open to suggestions.
| end | ||
| end | ||
|
|
||
| # Synonym for CGI.escapeElement(str) |
|
Is the bot suggestion relevant here?.. I believe that |
hsbt
left a comment
There was a problem hiding this comment.
Thanks!
I have no idea how sync ruby/cgi and this file yet. I try to that after Ruby 4.0 release.

After most of the CGI module was removed from Ruby, the module's docs now render thus:
This is, of course, just a typo in
:stopdoc:directive, but if the directive is correct, the class would be just empty. Which, when some novice tries to understand someCGI.escapeHTMLand where it is coming from, is not very friendly.Changed it to render this way:
Also, made some tiny adjustments to
CGI::Escapemodule docs (purely cosmetic ones).