diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-21 02:59:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-21 02:59:02 +0000 |
commit | 76e19bc534c36daf2d093ff3eb434737756a86ef (patch) | |
tree | 0b4f7ec27b9aea36dd25179eb59da5cb343be045 | |
parent | a8969e999a788c880dbd72d4622ab5c8bdf738a6 (diff) | |
download | ruby-76e19bc534c36daf2d093ff3eb434737756a86ef.tar.gz |
* string.c (rb_str_each_char): move forward. [ruby-dev:33231]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | string.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Mon Jan 21 11:59:00 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * string.c (rb_str_each_char): move forward. [ruby-dev:33231] + Mon Jan 21 06:40:03 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * transcode.c (transcode_dispatch): constified return value. @@ -3233,7 +3233,7 @@ rb_str_inspect(VALUE str) char *s; char *q; -escape_codepoint: + escape_codepoint: for (q = p-n; q < p; q++) { s = buf; sprintf(buf, "\\x%02X", *q & 0377); @@ -4605,7 +4605,7 @@ rb_str_each_char(VALUE str) len = RSTRING_LEN(str); if ((i += n) >= len) break; enc = rb_enc_get(str); - s = rb_enc_left_char_head(ptr, ptr + i, enc); + s = rb_enc_right_char_head(ptr, ptr + i, enc); n = rb_enc_mbclen(s, ptr + len, enc); } return str; |