1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Refactor rb_str_export and rb_str_export_locale function's

This commit is contained in:
S-H-GAMELINKS 2021-07-06 21:19:57 +09:00 committed by Nobuyoshi Nakada
parent b1b7f997ae
commit 9952e9358e
Notes: git 2021-07-07 12:32:03 +09:00

View file

@ -1180,13 +1180,13 @@ rb_filesystem_str_new_cstr(const char *ptr)
VALUE
rb_str_export(VALUE str)
{
return rb_str_conv_enc(str, STR_ENC_GET(str), rb_default_external_encoding());
return rb_str_export_to_enc(str, rb_default_external_encoding());
}
VALUE
rb_str_export_locale(VALUE str)
{
return rb_str_conv_enc(str, STR_ENC_GET(str), rb_locale_encoding());
return rb_str_export_to_enc(str, rb_locale_encoding());
}
VALUE