diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-04 12:31:16 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-04 12:31:16 +0000 |
commit | b28ac942ef90c255f26c7bbfbf27046740a72da5 (patch) | |
tree | 8c3ee05e74e705fdaa81800f7a153e40de31df5d /sprintf.c | |
parent | 184abbe8a30938a5d7c79da333285b85cb7f00e3 (diff) |
merges r23186 and r23187 from trunk into ruby_1_9_1.
--
* sprintf.c (rb_str_format): check encoding compatibility only on
real parts.
--
* sprintf.c (rb_str_format): optimize previous commit.
[ruby-list:45954]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r-- | sprintf.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -652,6 +652,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt) str = rb_obj_as_string(arg); if (OBJ_TAINTED(str)) tainted = 1; len = RSTRING_LEN(str); + rb_str_set_len(result, blen); enc = rb_enc_check(result, str); if (flags&(FPREC|FWIDTH)) { slen = rb_enc_strlen(RSTRING_PTR(str),RSTRING_END(str),enc); |