io.c: ARGF.file returns $stdin instead of STDIN [ci skip]

For example:
`ruby -e '$stdin=open(IO::NULL);p [STDIN,$stdin,ARGF.file]'`
prints `[#<IO:<STDIN>>, #<File:/dev/null>, #<File:/dev/null>]`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2017-04-09 11:53:53 +00:00
parent 9e4da4486b
commit 434c353e71

2
io.c
View File

@ -11988,7 +11988,7 @@ argf_filename_getter(ID id, VALUE *var)
* ARGF.file -> IO or File object
*
* Returns the current file as an +IO+ or +File+ object.
* <code>#<IO:<STDIN>></code> is returned when the current file is STDIN.
* <code>$stdin</code> is returned when the current file is STDIN.
*
* For example:
*