Skip to content

Commit 3ca9d12

Browse files
hsbtclaude
andcommitted
[DOC] Fix accept_charset default value in examples
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>
1 parent 5f26d1a commit 3ca9d12

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/cgi/core.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -953,16 +953,16 @@ def self.accept_charset
953953
# see {Encodings}[https://docs.ruby-lang.org/en/master/language/encodings_rdoc.html]:
954954
#
955955
# # The initial value.
956-
# CGI.accept_charset # => "UTF-8"
956+
# CGI.accept_charset # => #<Encoding:UTF-8>
957957
# CGI.new
958958
# # =>
959959
# #<CGI:0x0000018991db6ae8
960-
# @accept_charset="UTF-8",
960+
# @accept_charset=#<Encoding:UTF-8>,
961961
# @accept_charset_error_block=nil,
962962
# @cookies={},
963963
# @max_multipart_length=134217728,
964964
# @multipart=false,
965-
# @options={accept_charset: "UTF-8", max_multipart_length: 134217728},
965+
# @options={accept_charset: #<Encoding:UTF-8>, max_multipart_length: 134217728},
966966
# @output_cookies=nil,
967967
# @output_hidden=nil,
968968
# @params={}>
@@ -1045,12 +1045,12 @@ def self.accept_charset=(accept_charset)
10451045
# cgi
10461046
# # =>
10471047
# #<CGI:0x00000189917aff00
1048-
# @accept_charset="UTF-8",
1048+
# @accept_charset=#<Encoding:UTF-8>,
10491049
# @accept_charset_error_block=nil,
10501050
# @cookies={},
10511051
# @max_multipart_length=134217728,
10521052
# @multipart=false,
1053-
# @options={accept_charset: "UTF-8", max_multipart_length: 134217728},
1053+
# @options={accept_charset: #<Encoding:UTF-8>, max_multipart_length: 134217728},
10541054
# @output_cookies=nil,
10551055
# @output_hidden=nil,
10561056
# @params={}>

0 commit comments

Comments
 (0)