summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-30 13:53:30 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-30 13:53:30 +0000
commit410c048a3a44627aa152e721593526c970e9478b (patch)
tree3d1a74e409e1d6aabe738a1904807127e6c55cf0
parent657a806711577f275425853632f3af0252a43ae7 (diff)
merge revision(s) 58062: [Backport #13306]
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_3@58517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--io.c13
-rw-r--r--version.h2
3 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 242d40e777..01beaed0b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Apr 30 22:52:38 2017 Marcus Stollsteimer <sto.mar@web.de>
+
+ * io.c: [DOC] expand docs for IO#puts
+ [Bug #13306]
+
Sun Apr 30 22:38:44 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
sample/pty/shl.rb: update [ci skip]
diff --git a/io.c b/io.c
index a000450af8..72fbff3e3b 100644
--- a/io.c
+++ b/io.c
@@ -7099,15 +7099,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#write</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.
- * This doesn't affect $/. ($RS or INPUT_RECORD_SEPARATOR in English.rb)
*
- * $stdout.puts("this", "is", "a", "test")
+ * $stdout.puts("this", "is", ["a", "test"])
*
* <em>produces:</em>
*
@@ -7115,6 +7117,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 2537743f92..b54ed9782b 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.3.5"
#define RUBY_RELEASE_DATE "2017-04-30"
-#define RUBY_PATCHLEVEL 306
+#define RUBY_PATCHLEVEL 307
#define RUBY_RELEASE_YEAR 2017
#define RUBY_RELEASE_MONTH 4