diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-02-12 19:29:18 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-02-12 19:58:22 +0900 |
commit | bdf3032e3542b318c6f52dbe20d1c97cca3d7067 (patch) | |
tree | 6923498ebb1907e78207edaad7f2e143e0fc31ee /sprintf.c | |
parent | 1b219f1fb26d15d69d4a0cb628f856f6f850eac5 (diff) |
Make temporary lock string encoding free
As a temporary lock string is hidden, it can not have instance
variables, including non-inlined encoding index.
Diffstat (limited to 'sprintf.c')
-rw-r--r-- | sprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -257,7 +257,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt) blen = 0; bsiz = 120; result = rb_str_buf_new(bsiz); - rb_enc_copy(result, fmt); + rb_enc_associate(result, enc); buf = RSTRING_PTR(result); memset(buf, 0, bsiz); ENC_CODERANGE_SET(result, coderange); |