Skip to content

[DOC] Fix examples in accept_charset and http_header docs#125

Merged
hsbt merged 2 commits into
masterfrom
doc-fix-merged-examples
Jun 23, 2026
Merged

[DOC] Fix examples in accept_charset and http_header docs#125
hsbt merged 2 commits into
masterfrom
doc-fix-merged-examples

Conversation

@hsbt

@hsbt hsbt commented Jun 23, 2026

Copy link
Copy Markdown
Member

Follow-up to the recently merged documentation work in #95, #97, and #98.

The accept_charset examples showed the default value as the string "UTF-8". Requiring 'cgi' loads the cgi/escape extension, which initializes @@accept_charset to Encoding::UTF_8, so the real inspect output is #Encoding:UTF-8. The examples now reflect that.

The http_header documentation said the string content_type argument uses "its default value" while its own example passes and prints text/xml, so it now says the given value is used. The 'length' key description was also missing "to".

hsbt and others added 2 commits June 23, 2026 14:24
CGI.accept_charset is initialized to Encoding::UTF_8 by the cgi/escape
extension when 'cgi' is required, so the inspect examples should show
#<Encoding:UTF-8>, not the string "UTF-8".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The +content_type+ paragraph said "its default value" while its example
shows the given value being used, and the 'length' key was missing "to".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hsbt hsbt merged commit 3ef2409 into master Jun 23, 2026
70 checks passed
@hsbt hsbt deleted the doc-fix-merged-examples branch June 23, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant