[前][次][番号順一覧][スレッド一覧]

ruby-changes:45707

From: stomar <ko1@a...>
Date: Sun, 5 Mar 2017 21:36:14 +0900 (JST)
Subject: [ruby-changes:45707] stomar:r57780 (trunk): docs for IO#print

stomar	2017-03-05 21:36:09 +0900 (Sun, 05 Mar 2017)

  New Revision: 57780

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57780

  Log:
    docs for IO#print
    
    * io.c: [DOC] split documentation for IO#print into smaller paragraphs,
      delete duplicate sentence, fix call-seq.
      Based on a patch by Dario Daic. [ruby-core:78291] [Bug #12975]

  Modified files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 57779)
+++ io.c	(revision 57780)
@@ -7012,18 +7012,20 @@ rb_f_printf(int argc, VALUE *argv) https://github.com/ruby/ruby/blob/trunk/io.c#L7012
 
 /*
  *  call-seq:
- *     ios.print()             -> nil
+ *     ios.print               -> nil
  *     ios.print(obj, ...)     -> nil
  *
- *  Writes the given object(s) to <em>ios</em>. The stream must be
- *  opened for writing. If the output field separator (<code>$,</code>)
- *  is not <code>nil</code>, it will be inserted between each object.
- *  If the output record separator (<code>$\\</code>)
- *  is not <code>nil</code>, it will be appended to the output. If no
- *  arguments are given, prints <code>$_</code>. Objects that aren't
- *  strings will be converted by calling their <code>to_s</code> method.
- *  With no argument, prints the contents of the variable <code>$_</code>.
- *  Returns <code>nil</code>.
+ *  Writes the given object(s) to <em>ios</em>. Returns <code>nil</code>.
+ *
+ *  The stream must be opened for writing.
+ *  Each given object that isn't a string will be converted by calling
+ *  its <code>to_s</code> method.
+ *  When called without arguments, prints the contents of <code>$_</code>.
+ *
+ *  If the output field separator (<code>$,</code>) is not <code>nil</code>,
+ *  it is inserted between objects.
+ *  If the output record separator (<code>$\\</code>) is not <code>nil</code>,
+ *  it is appended to the output.
  *
  *     $stdout.print("This is ", 100, " percent.\n")
  *

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]