mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix description of Encoding.default_(in|ex)ternal
Data written to files is not transcoded per default, but only when default_internal is set. The default for default_internal is nil and doesn't depend on the source file encoding.
This commit is contained in:
parent
e7739b600f
commit
a4fca28b80
Notes:
git
2020-02-04 02:14:58 +09:00
1 changed files with 2 additions and 3 deletions
|
@ -1475,7 +1475,7 @@ rb_enc_default_external(void)
|
||||||
* encoding may not be valid. Be sure to check String#valid_encoding?.
|
* encoding may not be valid. Be sure to check String#valid_encoding?.
|
||||||
*
|
*
|
||||||
* File data written to disk will be transcoded to the default external
|
* File data written to disk will be transcoded to the default external
|
||||||
* encoding when written.
|
* encoding when written, if default_internal is not nil.
|
||||||
*
|
*
|
||||||
* The default external encoding is initialized by the locale or -E option.
|
* The default external encoding is initialized by the locale or -E option.
|
||||||
*/
|
*/
|
||||||
|
@ -1560,8 +1560,7 @@ rb_enc_default_internal(void)
|
||||||
* The script encoding (__ENCODING__), not default_internal, is used as the
|
* The script encoding (__ENCODING__), not default_internal, is used as the
|
||||||
* encoding of created strings.
|
* encoding of created strings.
|
||||||
*
|
*
|
||||||
* Encoding::default_internal is initialized by the source file's
|
* Encoding::default_internal is initialized with -E option or nil otherwise.
|
||||||
* internal_encoding or -E option.
|
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
get_default_internal(VALUE klass)
|
get_default_internal(VALUE klass)
|
||||||
|
|
Loading…
Add table
Reference in a new issue