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
This commit is contained in:
nobu 2017-10-05 02:35:58 +00:00
Родитель 80855409ce
Коммит 09e60b5af5
1 изменённых файлов: 5 добавлений и 0 удалений

5
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 * mode and permission bits are platform dependent; on Unix systems, see
* open(2) and chmod(2) man pages for details. * 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 * === Examples
* *
* f = File.new("testfile", "r") * f = File.new("testfile", "r")