[前][次][番号順一覧][スレッド一覧]

ruby-changes:48180

From: hsbt <ko1@a...>
Date: Sun, 22 Oct 2017 00:17:00 +0900 (JST)
Subject: [ruby-changes:48180] hsbt:r60294 (trunk): Clarify the behavior of IO.write without offset in write mode.

hsbt	2017-10-22 00:16:54 +0900 (Sun, 22 Oct 2017)

  New Revision: 60294

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60294

  Log:
    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 files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 60293)
+++ io.c	(revision 60294)
@@ -10287,8 +10287,8 @@ io_s_write(int argc, VALUE *argv, int bi https://github.com/ruby/ruby/blob/trunk/io.c#L10287
  *  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"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]