From 410c048a3a44627aa152e721593526c970e9478b Mon Sep 17 00:00:00 2001 From: usa Date: Sun, 30 Apr 2017 13:53:30 +0000 Subject: 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 --- ChangeLog | 5 +++++ io.c | 13 +++++++++---- version.h | 2 +- 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 + + * io.c: [DOC] expand docs for IO#puts + [Bug #13306] + Sun Apr 30 22:38:44 2017 Nobuyoshi Nakada 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 ios as with IO#write. + * Writes the given object(s) to ios. * 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"]) * * produces: * @@ -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 ($\\). */ 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 -- cgit v1.2.3