summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 16:30:08 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 16:30:08 +0000
commitc28229f3fc4c292e384af92811734b2875c11a9c (patch)
tree86a45b97adb5243a69110704d7f5c1a81fd19820 /io.c
parentd589608da9915722e494119a874cb36cc5e42df2 (diff)
merge revision(s) 57780: [Backport #12975]
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/io.c b/io.c
index 691bca1643..accde8dc76 100644
--- a/io.c
+++ b/io.c
@@ -7006,18 +7006,20 @@ rb_f_printf(int argc, VALUE *argv)
/*
* 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")
*