From 09e60b5af5a0ca5b76b82cbc8beaada76a0414eb Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 5 Oct 2017 02:35:58 +0000 Subject: 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 --- io.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'io.c') 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 IO#sync= + * about sync mode. + * * === Examples * * f = File.new("testfile", "r") -- cgit v1.2.3