aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-05 02:35:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-05 02:35:58 +0000
commit67879c4f2e29baeb97c61a0a811eaff6096d9c95 (patch)
tree7ba5daa6972d10fa8cc166c7af441ba675af3c49
parenteb978ade5fdc990c628af0c74c80871bba5fa074 (diff)
downloadruby-67879c4f2e29baeb97c61a0a811eaff6096d9c95.tar.gz
io.c: [DOC] about buffering [ci skip]
* io.c (rb_file_initialize): [DOC] stated that non-tty file is buffered by the default, and added links to related methods. [ruby-core:83081] [Bug #13965] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--io.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/io.c b/io.c
index 6226108ad6..3000e94d9a 100644
--- a/io.c
+++ b/io.c
@@ -7952,6 +7952,11 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io)
* mode and permission bits are platform dependent; on Unix systems, see
* open(2) and chmod(2) man pages for details.
*
+ * The new File object is buffered mode (or non-sync mode), unless
+ * +filename+ is a tty.
+ * See IO#flush, IO#fsync, IO#fdatasync, and <code>IO#sync=</code>
+ * about sync mode.
+ *
* === Examples
*
* f = File.new("testfile", "r")