From 66bae8ad6df90c83b34908057afd991ffc9492c7 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 13 Dec 2007 09:05:49 +0000 Subject: * string.c (str_gsub): should copy encoding to the result. * sprintf.c (rb_str_format): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sprintf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sprintf.c') diff --git a/sprintf.c b/sprintf.c index ed02e01aeb..0835dab3d1 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; } -- cgit v1.2.3