aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-16 16:36:08 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-16 16:36:08 +0000
commitd6f289b0ff42aa0320a13b08467a70f8844bd72f (patch)
treee5f3bd492caacf47e638048ad9cd6ac64a53073d
parentde1324fb7fa3ca0e68b7732e688b169c44fea4c7 (diff)
downloadruby-d6f289b0ff42aa0320a13b08467a70f8844bd72f.tar.gz
* io.c (rb_io_rewind, rb_io_eof): add rdoc. based on a patch from
Roger Pack in [ruby-core:26771] [Bug #2377]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--io.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 772104adf3..2ff7491430 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Apr 17 01:32:50 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * 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@nifty.ne.jp>
* test/win32ole/test_folderitem2_invokeverb.rb (test_invokeverb):
diff --git a/io.c b/io.c
index 3afa413183..2c18e07c75 100644
--- a/io.c
+++ b/io.c
@@ -1159,6 +1159,8 @@ static void clear_readconv(rb_io_t *fptr);
* 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 @@ io_fillbuf(rb_io_t *fptr)
* 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