mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d2e61b41f5
commit
d4e1b7fcec
1 changed files with 5 additions and 4 deletions
9
io.c
9
io.c
|
@ -7181,11 +7181,12 @@ 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#print</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.
|
||||
*
|
||||
* $stdout.puts("this", "is", "a", "test")
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue