ruby-changes:70910
From: Masataka <ko1@a...>
Date: Mon, 17 Jan 2022 00:26:27 +0900 (JST)
Subject: [ruby-changes:70910] 28fad7764e (master): Tweak IO documentation for `IO.write('|cmd')` and so on [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=28fad7764e From 28fad7764e75c56209a55278a2f5522d118395f0 Mon Sep 17 00:00:00 2001 From: Masataka Pocke Kuwabara <kuwabara@p...> Date: Sat, 15 Jan 2022 23:46:52 +0900 Subject: Tweak IO documentation for `IO.write('|cmd')` and so on [ci skip] --- io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/io.c b/io.c index 39c4dcac48d..0973bd604fe 100644 --- a/io.c +++ b/io.c @@ -11161,7 +11161,7 @@ io_s_foreach(VALUE v) https://github.com/ruby/ruby/blob/trunk/io.c#L11161 * * 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 } @@ -11220,7 +11220,7 @@ io_s_readlines(VALUE v) https://github.com/ruby/ruby/blob/trunk/io.c#L11220 * * 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") @@ -11481,7 +11481,7 @@ io_s_write(int argc, VALUE *argv, VALUE klass, int binary) https://github.com/ruby/ruby/blob/trunk/io.c#L11481 * * 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 @@ -11539,7 +11539,7 @@ rb_io_s_write(int argc, VALUE *argv, VALUE io) https://github.com/ruby/ruby/blob/trunk/io.c#L11539 * * 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. -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/