1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add doc for opt parameter of IO#reopen [ci skip]

It can be specified from 2.0. Ref: https://bugs.ruby-lang.org/issues/7103

[Fix GH-1841]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-03-17 06:39:18 +00:00
parent 4b3809114b
commit 38abd83529

5
io.c
View file

@ -7225,12 +7225,13 @@ rb_freopen(VALUE fname, const char *mode, FILE *fp)
/*
* call-seq:
* ios.reopen(other_IO) -> ios
* ios.reopen(path, mode_str) -> ios
* ios.reopen(other_IO) -> ios
* ios.reopen(path, mode, [, opt]) -> ios
*
* Reassociates <em>ios</em> with the I/O stream given in
* <i>other_IO</i> or to a new stream opened on <i>path</i>. This may
* dynamically change the actual class of this stream.
* The +mode+ and +opt+ parameters accept the same values as IO.open.
*
* f1 = File.new("testfile")
* f2 = File.new("testfile")