ruby-changes:15462
From: mame <ko1@a...>
Date: Sat, 17 Apr 2010 01:37:37 +0900 (JST)
Subject: [ruby-changes:15462] Ruby:r27361 (trunk): * io.c (rb_io_rewind, rb_io_eof): add rdoc. based on a patch from
mame 2010-04-17 01:36:08 +0900 (Sat, 17 Apr 2010) New Revision: 27361 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27361 Log: * io.c (rb_io_rewind, rb_io_eof): add rdoc. based on a patch from Roger Pack in [ruby-core:26771] [Bug #2377]. Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 27360) +++ ChangeLog (revision 27361) @@ -1,3 +1,8 @@ +Sat Apr 17 01:32:50 2010 Yusuke Endoh <mame@t...> + + * io.c (rb_io_rewind, rb_io_eof): add rdoc. based on a patch from + Roger Pack in [ruby-core:26771] [Bug #2377]. + Fri Apr 16 23:42:56 2010 Masaki Suketa <masaki.suketa@n...> * test/win32ole/test_folderitem2_invokeverb.rb (test_invokeverb): Index: io.c =================================================================== --- io.c (revision 27360) +++ io.c (revision 27361) @@ -1159,6 +1159,8 @@ * f.rewind #=> 0 * f.lineno #=> 0 * f.readline #=> "This is line one\n" + * + * Note that it cannot be used with streams such as pipes, ttys, and sockets. */ static VALUE @@ -1241,8 +1243,10 @@ * r, w = IO.pipe * r.eof? # blocks forever * - * Note that <code>IO#eof?</code> reads data to a input buffer. - * So <code>IO#sysread</code> doesn't work with <code>IO#eof?</code>. + * Note that <code>IO#eof?</code> reads data to the input buffer. + * So <code>IO#sysread</code> may not behave as you intend with + * <code>IO#eof?</code>, unless you call <code>IO#rewind</code> + * first (which is not available for some streams). */ VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/