diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-19 06:15:35 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-19 06:15:35 +0000 |
commit | ac5250098da52e75f376ada50e738aae4330b2d9 (patch) | |
tree | 3c6fe8f98435a96c4a0264ee8de6e65581d4f28c | |
parent | c3f8c067954023ca268a9c8d83b379f267c4f19d (diff) |
* string.c (rb_str_justify): should propagate encoding from pad
string too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | string.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Dec 19 15:13:20 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * string.c (rb_str_justify): should propagate encoding from pad + string too. + Wed Dec 19 13:57:43 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * configure.in (TIMEZONE_VOID): check whether timezone requires zero @@ -5023,7 +5023,7 @@ rb_str_justify(int argc, VALUE *argv, VALUE str, char jflag) width = NUM2LONG(w); if (argc == 2) { StringValue(pad); - rb_enc_check(str, pad); + enc = rb_enc_check(str, pad); f = RSTRING_PTR(pad); flen = RSTRING_LEN(pad); fclen = str_strlen(pad, enc); |