* 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
This commit is contained in:
wanabe 2010-01-31 14:24:40 +00:00
parent ddf72817b0
commit 8d33d0a560
2 changed files with 6 additions and 2 deletions

View File

@ -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> 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. * test/ruby/test_dir.rb: use string instead of symbol as file name.

4
io.c
View File

@ -2860,8 +2860,8 @@ rb_io_each_codepoint(VALUE io)
c = rb_enc_codepoint(fptr->cbuf+fptr->cbuf_off, c = rb_enc_codepoint(fptr->cbuf+fptr->cbuf_off,
fptr->cbuf+fptr->cbuf_off+fptr->cbuf_len, fptr->cbuf+fptr->cbuf_off+fptr->cbuf_len,
fptr->encs.enc); fptr->encs.enc);
fptr->rbuf_off += n; fptr->cbuf_off += n;
fptr->rbuf_len -= n; fptr->cbuf_len -= n;
rb_yield(UINT2NUM(c)); rb_yield(UINT2NUM(c));
} }
} }