ruby-changes:15848
From: usa <ko1@a...>
Date: Thu, 13 May 2010 18:18:08 +0900 (JST)
Subject: [ruby-changes:15848] Ruby:r27782 (trunk): * io.c (swallow): should use more_char() instead of fill_cbuf().
usa 2010-05-13 18:16:32 +0900 (Thu, 13 May 2010) New Revision: 27782 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27782 Log: * io.c (swallow): should use more_char() instead of fill_cbuf(). suggested by akr. Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 27781) +++ ChangeLog (revision 27782) @@ -1,3 +1,8 @@ +Thu May 13 18:15:33 2010 NAKAMURA Usaku <usa@r...> + + * io.c (swallow): should use more_char() instead of fill_cbuf(). + suggested by akr. + Thu May 13 17:56:07 2010 Nobuyoshi Nakada <nobu@r...> * ext/io/console/console.c (console_set_echo, console_echo_p): use Index: io.c =================================================================== --- io.c (revision 27781) +++ io.c (revision 27782) @@ -2296,7 +2296,6 @@ if (NEED_READCONV(fptr)) { rb_encoding *enc = io_read_encoding(fptr); int needconv = rb_enc_mbminlen(enc) != 1; - VALUE v; make_readconv(fptr, 0); do { size_t cnt; @@ -2315,10 +2314,7 @@ } io_shift_cbuf(fptr, (int)cnt - i, NULL); } - v = fill_cbuf(fptr, 0); - if (v != MORE_CHAR_SUSPENDED && v != MORE_CHAR_FINISHED) - rb_exc_raise(v); - } while (v == MORE_CHAR_SUSPENDED); + } while (more_char(fptr) != MORE_CHAR_FINISHED); return FALSE; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/