summaryrefslogtreecommitdiffstats
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
commit122ccdbf5e58d00ffe8cc8873566fc753a9ab15d (patch)
treea5d63eccc053ea7d07ddfb2ca47bc3203f8558fd /sprintf.c
parentd873f09705f13723474199671408857ca4e7431d (diff)
downloadruby-122ccdbf5e58d00ffe8cc8873566fc753a9ab15d.tar.gz
ruby-122ccdbf5e58d00ffe8cc8873566fc753a9ab15d.tar.xz
ruby-122ccdbf5e58d00ffe8cc8873566fc753a9ab15d.zip
* string.c (str_gsub): should copy encoding to the result.
* sprintf.c (rb_str_format): ditto. git-svn-id: http://svn.ruby-lang.org/repos/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 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;
}