diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-19 20:38:37 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-19 20:38:37 +0000 |
commit | 250fa1cbf04aeea9769be4060825ffcf21f08f91 (patch) | |
tree | 0e148c89b1c788e4ab46aa24eccf1998801f01fe /io.c | |
parent | 0f1e7563100c7957e8cddf2058d5ad3880937cf1 (diff) |
merge revision(s) 57767,57944: [Backport #10403]
io.c: documentation for puts
* io.c: [DOC] clarify that the 'record separator' between
arguments passed to 'puts' is always a newline.
Based on a patch by Mark Amery. [ruby-core:65801] [Misc #10403]
io.c: [DOC] IO#puts uses IO#write
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -7080,11 +7080,13 @@ io_puts_ary(VALUE ary, VALUE out, int recur) * call-seq: * ios.puts(obj, ...) -> nil * - * Writes the given objects to <em>ios</em> as with - * <code>IO#print</code>. Writes a record separator (typically a - * newline) after any that do not already end with a newline sequence. + * Writes the given object(s) to <em>ios</em> as with <code>IO#write</code>. + * Writes a newline after any that do not already end + * with a newline sequence. + * * If called with an array argument, writes each element on a new line. - * If called without arguments, outputs a single record separator. + * 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") * |