ruby-changes:11552
From: naruse <ko1@a...>
Date: Mon, 13 Apr 2009 11:00:44 +0900 (JST)
Subject: [ruby-changes:11552] Ruby:r23186 (trunk): * sprintf.c (rb_str_format): check encoding compatibility only on
naruse 2009-04-13 11:00:30 +0900 (Mon, 13 Apr 2009) New Revision: 23186 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23186 Log: * sprintf.c (rb_str_format): check encoding compatibility only on real parts. Modified files: trunk/ChangeLog trunk/sprintf.c trunk/version.h Index: ChangeLog =================================================================== --- ChangeLog (revision 23185) +++ ChangeLog (revision 23186) @@ -1,3 +1,8 @@ +Mon Apr 13 10:58:54 2009 NARUSE, Yui <naruse@r...> + + * sprintf.c (rb_str_format): check encoding compatibility only on + real parts. + Sun Apr 12 19:54:56 2009 Nobuyoshi Nakada <nobu@r...> * dir.c (bracket, fnmatch_helper): compare bytewise first, to get Index: sprintf.c =================================================================== --- sprintf.c (revision 23185) +++ sprintf.c (revision 23186) @@ -660,7 +660,7 @@ str = rb_obj_as_string(arg); if (OBJ_TAINTED(str)) tainted = 1; len = RSTRING_LEN(str); - enc = rb_enc_check(result, str); + enc = rb_enc_check(rb_str_substr(result, 0, blen), str); if (flags&(FPREC|FWIDTH)) { slen = rb_enc_strlen(RSTRING_PTR(str),RSTRING_END(str),enc); if (slen < 0) { Index: version.h =================================================================== --- version.h (revision 23185) +++ version.h (revision 23186) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2009-04-12" +#define RUBY_RELEASE_DATE "2009-04-13" #define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" @@ -8,7 +8,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 4 -#define RUBY_RELEASE_DAY 12 +#define RUBY_RELEASE_DAY 13 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/