Actions
Bug #689
closedreading after EOF with textmode
    Bug #689:
    reading after EOF with textmode
  
Description
=begin
こんにちは、なかむら(う)です。
テキストモード時に一度EOFに到達すると、rewindやseekでポインタ
を移動するとか新しいデータが到達するとかしても、EOF状態から脱
出できないようです。
more_char()でEOFを検知した時点でreadconvをリセットする必要が
あるように思えるのですが、そういう理解で正しいでしょうか?
Index: io.c¶
--- io.c	(revision 19991)
+++ io.c	(working copy)
@@ -1457,6 +1457,8 @@ make_readconv(rb_io_t *fptr)
}
}
+static void clear_readconv(rb_io_t *fptr);
+
static int
more_char(rb_io_t *fptr)
{
@@ -1499,8 +1501,10 @@ more_char(rb_io_t *fptr)
if (cbuf_len0 != fptr->cbuf_len)
return 0;
- 
if (res == econv_finished) 
- 
if (res == econv_finished) {
 - 
clear_readconv(fptr); return -1; - 
}
if (res == econv_source_buffer_empty) { if (fptr->rbuf_len == 0) { 
それでは。¶
U.Nakamura usa@garbagecollect.jp
=end
        
          
          Updated by usa (Usaku NAKAMURA) about 17 years ago
          
          
        
        
      
      - Due date set to 11/25/2008
 - Category set to M17N
 - Priority changed from 3 to Normal
 - Target version set to 2.0.0
 - Start date set to 10/28/2008
 
=begin
=end
        
          
          Updated by matz (Yukihiro Matsumoto) almost 17 years ago
          
          
        
        
      
      - Status changed from Open to Closed
 
=begin
fixed by r20045
=end
Actions