aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/io.c b/io.c
index 480bed9157..712dce3ceb 100644
--- a/io.c
+++ b/io.c
@@ -14625,11 +14625,16 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
* ARGV.replace ["file2", "file3"]
* ARGF.read # Returns the contents of file2 and file3
*
- * If +ARGV+ is empty, ARGF acts as if it contained STDIN, i.e. the data
- * piped to your script. For example:
+ * If +ARGV+ is empty, ARGF acts as if it contained <tt>"-"</tt> that
+ * makes ARGF read from STDIN, i.e. the data piped or typed to your
+ * script. For example:
*
* $ echo "glark" | ruby -e 'p ARGF.read'
* "glark\n"
+ *
+ * $ echo Glark > file1
+ * $ echo "glark" | ruby -e 'p ARGF.read' -- - file1
+ * "glark\nGlark\n"
*/
/*