Clarify documentation for encoding of String.new without arguments

[Bug #21025]
This commit is contained in:
David Rodríguez 2025-01-10 23:36:51 +01:00 committed by GitHub
parent 50c2c4bdde
commit cde065c32c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
Notes: git 2025-01-10 22:37:13 +00:00
Merged: https://github.com/ruby/ruby/pull/12548

Merged-By: XrXr

View File

@ -144,6 +144,7 @@ see {Script Encoding}[rdoc-ref:encodings.rdoc@Script+Encoding].
The default encoding for a string created with method String.new is:
- For no argument, ASCII-8BIT.
- For a \String object argument, the encoding of that string.
- For a string literal, the script encoding;
see {Script Encoding}[rdoc-ref:encodings.rdoc@Script+Encoding].