summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwanabe <wanabe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-31 14:24:40 +0000
committerwanabe <wanabe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-31 14:24:40 +0000
commit8d33d0a5609455a334e53e1530409530a3a5ceed (patch)
tree09a098474a2557b518aa9d55c70e8344e1e8843f
parentddf72817b05464508d2c89add72babca99a50820 (diff)
* io.c (rb_io_each_codepoint): use cbuf when needs readconv.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--io.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f0ef6cf246..f459b2f37c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Jan 31 23:20:43 2010 wanabe <s.wanabe@gmail.com>
+
+ * io.c (rb_io_each_codepoint): use cbuf when needs readconv.
+
Sun Jan 31 23:07:23 2010 Yusuke Endoh <mame@tsg.ne.jp>
* test/ruby/test_dir.rb: use string instead of symbol as file name.
diff --git a/io.c b/io.c
index e69fc9dc46..4017778e0c 100644
--- a/io.c
+++ b/io.c
@@ -2860,8 +2860,8 @@ rb_io_each_codepoint(VALUE io)
c = rb_enc_codepoint(fptr->cbuf+fptr->cbuf_off,
fptr->cbuf+fptr->cbuf_off+fptr->cbuf_len,
fptr->encs.enc);
- fptr->rbuf_off += n;
- fptr->rbuf_len -= n;
+ fptr->cbuf_off += n;
+ fptr->cbuf_len -= n;
rb_yield(UINT2NUM(c));
}
}