[前][次][番号順一覧][スレッド一覧]

ruby-changes:46175

From: kazu <ko1@a...>
Date: Sun, 9 Apr 2017 20:53:59 +0900 (JST)
Subject: [ruby-changes:46175] kazu:r58288 (trunk): io.c: ARGF.file returns $stdin instead of STDIN [ci skip]

kazu	2017-04-09 20:53:53 +0900 (Sun, 09 Apr 2017)

  New Revision: 58288

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58288

  Log:
    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>]`

  Modified files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 58287)
+++ io.c	(revision 58288)
@@ -11988,7 +11988,7 @@ argf_filename_getter(ID id, VALUE *var) https://github.com/ruby/ruby/blob/trunk/io.c#L11988
  *     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:
  *

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]