Skip to content

Commit

Permalink
Tweak IO documentation for IO.write('|cmd') and so on [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
pocke authored and nobu committed Jan 16, 2022
1 parent 2dff82b commit 28fad77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions io.c
Original file line number Diff line number Diff line change
Expand Up @@ -11161,7 +11161,7 @@ io_s_foreach(VALUE v)
*
* If +name+ starts with a pipe character (<code>"|"</code>) and the receiver
* is the IO class, a subprocess is created in the same way as Kernel#open,
* and its output is returned.
* and each line in its output is yielded.
* Consider to use File.foreach to disable the behavior of subprocess invocation.
*
* File.foreach("testfile") {|x| print "GOT ", x }
Expand Down Expand Up @@ -11220,7 +11220,7 @@ io_s_readlines(VALUE v)
*
* If +name+ starts with a pipe character (<code>"|"</code>) and the receiver
* is the IO class, a subprocess is created in the same way as Kernel#open,
* and its output is returned.
* and each line in its output is yielded.
* Consider to use File.readlines to disable the behavior of subprocess invocation.
*
* a = File.readlines("testfile")
Expand Down Expand Up @@ -11481,7 +11481,7 @@ io_s_write(int argc, VALUE *argv, VALUE klass, int binary)
*
* If +name+ starts with a pipe character (<code>"|"</code>) and the receiver
* is the IO class, a subprocess is created in the same way as Kernel#open,
* and its output is returned.
* and its output is printed to the standard output.
* Consider to use File.write to disable the behavior of subprocess invocation.
*
* File.write("testfile", "0123456789", 20) #=> 10
Expand Down Expand Up @@ -11539,7 +11539,7 @@ rb_io_s_write(int argc, VALUE *argv, VALUE io)
*
* If +name+ starts with a pipe character (<code>"|"</code>) and the receiver
* is the IO class, a subprocess is created in the same way as Kernel#open,
* and its output is returned.
* and its output is printed to the standard output.
* Consider to use File.binwrite to disable the behavior of subprocess invocation.
*
* See also IO.read for details about +name+ and open_args.
Expand Down

0 comments on commit 28fad77

Please sign in to comment.