summaryrefslogtreecommitdiffstats
path: root/sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sprintf.c b/sprintf.c
index ed02e01ae..0835dab3d 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -848,6 +848,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
rb_str_resize(result, blen);
if (tainted) OBJ_TAINT(result);
+ rb_enc_associate(result, enc);
return result;
}