summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sprintf.c2
-rw-r--r--version.h4
3 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index fe4f424..2d85de3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Apr 13 10:58:54 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * sprintf.c (rb_str_format): check encoding compatibility only on
+ real parts.
+
Sun Apr 12 19:54:56 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* dir.c (bracket, fnmatch_helper): compare bytewise first, to get
diff --git a/sprintf.c b/sprintf.c
index 9f3183a..2bcf138 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -660,7 +660,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);
- 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) {
diff --git a/version.h b/version.h
index 44ede70..4840f2b 100644
--- a/version.h
+++ b/version.h
@@ -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[];