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

ruby-changes:22918

From: sorah <ko1@a...>
Date: Sun, 11 Mar 2012 15:50:00 +0900 (JST)
Subject: [ruby-changes:22918] sorah:r34967 (trunk): * io.c: fix rdoc of `IO.binwrite` to show same as `IO.write` except

sorah	2012-03-11 15:49:49 +0900 (Sun, 11 Mar 2012)

  New Revision: 34967

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34967

  Log:
    * io.c: fix rdoc of `IO.binwrite` to show same as `IO.write` except
      it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34966)
+++ ChangeLog	(revision 34967)
@@ -1,3 +1,8 @@
+Sun Mar 11 15:46:45 2012  Shota Fukumori  <sorah@t...>
+
+	* io.c: fix rdoc of `IO.binwrite` to show same as `IO.write` except
+	  it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]
+
 Sat Mar 10 23:52:28 2012  Nobuyoshi Nakada  <nobu@r...>
 
 	* st.c: pack tables also generic keys.  patched by Sokolov Yura at
Index: io.c
===================================================================
--- io.c	(revision 34966)
+++ io.c	(revision 34967)
@@ -9246,18 +9246,11 @@
 /*
  *  call-seq:
  *     IO.binwrite(name, string, [offset] )   => fixnum
+ *     IO.binwrite(name, string, [offset], open_args )   => fixnum
  *
- *  Opens the file, optionally seeks to the given <i>offset</i>, writes
- *  <i>string</i> then returns the length written.
- *  <code>binwrite</code> ensures the file is closed before returning.
- *  The open mode would be "wb:ASCII-8BIT".
- *  If <i>offset</i> is not given, the file is truncated.  Otherwise,
- *  it is not truncated.
+ *  Same as <code>IO.write</code> except opening the file in binary mode
+ *  and ASCII-8BIT encoding ("wb:ASCII-8BIT").
  *
- *     IO.binwrite("testfile", "0123456789", 20) # => 10
- *     # File could contain:  "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
- *     IO.binwrite("testfile", "0123456789")      #=> 10
- *     # File would now read: "0123456789"
  */
 
 static VALUE

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

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