diff --git a/io.c b/io.c index cd615fbbb2..085d7df2c9 100644 --- a/io.c +++ b/io.c @@ -7185,15 +7185,17 @@ io_puts_ary(VALUE ary, VALUE out, int recur) * call-seq: * ios.puts(obj, ...) -> nil * - * Writes the given object(s) to ios as with IO#write. + * Writes the given object(s) to ios. * Writes a newline after any that do not already end - * with a newline sequence. + * with a newline sequence. Returns +nil+. * + * The stream must be opened for writing. * If called with an array argument, writes each element on a new line. + * Each given object that isn't a string or array will be converted + * by calling its +to_s+ method. * If called without arguments, outputs a single newline. - * This doesn't affect $/. ($RS or $INPUT_RECORD_SEPARATOR in English.rb) * - * $stdout.puts("this", "is", "a", "test") + * $stdout.puts("this", "is", ["a", "test"]) * * produces: * @@ -7201,6 +7203,9 @@ io_puts_ary(VALUE ary, VALUE out, int recur) * is * a * test + * + * Note that +puts+ always uses newlines and is not affected + * by the output record separator ($\\). */ VALUE