summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-10 02:46:34 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-10 02:46:34 +0000
commit428687e96d9e58c13ebcbbfb4411f1edba71fcc5 (patch)
tree521e7de7643f640419f67296e2326365dc7f2185
parenta935fe6faeb6c5403faa1d1a2532a426dce50602 (diff)
merge revision(s) 57944,57977,58062: [Backport #13306]
io.c: [DOC] IO#puts uses IO#write io.c: [DOC] add missing `$` io.c: [DOC] expand docs for IO#puts [ruby-core:80081] [Bug #13306] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--io.c12
-rw-r--r--version.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/io.c b/io.c
index e84728f4e9..ee3ea3e68a 100644
--- a/io.c
+++ b/io.c
@@ -7185,14 +7185,17 @@ io_puts_ary(VALUE ary, VALUE out, int recur)
* call-seq:
* ios.puts(obj, ...) -> nil
*
- * Writes the given object(s) to <em>ios</em> as with <code>IO#print</code>.
+ * Writes the given object(s) to <em>ios</em>.
* 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.
*
- * $stdout.puts("this", "is", "a", "test")
+ * $stdout.puts("this", "is", ["a", "test"])
*
* <em>produces:</em>
*
@@ -7200,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 (<code>$\\</code>).
*/
VALUE
diff --git a/version.h b/version.h
index 0c154ab4ea..868460a26f 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.4.2"
#define RUBY_RELEASE_DATE "2017-09-10"
-#define RUBY_PATCHLEVEL 185
+#define RUBY_PATCHLEVEL 186
#define RUBY_RELEASE_YEAR 2017
#define RUBY_RELEASE_MONTH 9