ruby-changes:50551
From: nagachika <ko1@a...>
Date: Wed, 7 Mar 2018 23:28:36 +0900 (JST)
Subject: [ruby-changes:50551] nagachika:r62692 (ruby_2_4): merge revision(s) 60294: [Backport #11638]
nagachika 2018-03-07 23:28:31 +0900 (Wed, 07 Mar 2018) New Revision: 62692 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62692 Log: merge revision(s) 60294: [Backport #11638] Clarify the behavior of IO.write without offset in write mode. https://github.com/ruby/ruby/pull/1571 Patch by @takanabe [fix GH-1571] [Bug #11638][ruby-core:71277] Modified directories: branches/ruby_2_4/ Modified files: branches/ruby_2_4/io.c branches/ruby_2_4/version.h Index: ruby_2_4/io.c =================================================================== --- ruby_2_4/io.c (revision 62691) +++ ruby_2_4/io.c (revision 62692) @@ -10102,8 +10102,8 @@ io_s_write(int argc, VALUE *argv, int bi https://github.com/ruby/ruby/blob/trunk/ruby_2_4/io.c#L10102 * Opens the file, optionally seeks to the given <i>offset</i>, writes * <i>string</i>, then returns the length written. * <code>write</code> ensures the file is closed before returning. - * If <i>offset</i> is not given, the file is truncated. Otherwise, - * it is not truncated. + * If <i>offset</i> is not given in write mode, the file is truncated. + * Otherwise, it is not truncated. * * IO.write("testfile", "0123456789", 20) #=> 10 * # File could contain: "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n" Index: ruby_2_4/version.h =================================================================== --- ruby_2_4/version.h (revision 62691) +++ ruby_2_4/version.h (revision 62692) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1 #define RUBY_VERSION "2.4.4" #define RUBY_RELEASE_DATE "2018-03-07" -#define RUBY_PATCHLEVEL 254 +#define RUBY_PATCHLEVEL 255 #define RUBY_RELEASE_YEAR 2018 #define RUBY_RELEASE_MONTH 3 Index: ruby_2_4 =================================================================== --- ruby_2_4 (revision 62691) +++ ruby_2_4 (revision 62692) Property changes on: ruby_2_4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r60294 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/