summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-13 09:05:49 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-13 09:05:49 +0000
commit66bae8ad6df90c83b34908057afd991ffc9492c7 (patch)
treea5d63eccc053ea7d07ddfb2ca47bc3203f8558fd /sprintf.c
parentfb14b7eb05f9a2e378ebb69d2cbf001c3f4edbc3 (diff)
* 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
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 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;
}