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

ruby-changes:22248

From: drbrain <ko1@a...>
Date: Sat, 14 Jan 2012 07:00:01 +0900 (JST)
Subject: [ruby-changes:22248] drbrain:r34296 (trunk): * io.c (rb_io_s_read): Fix formatting of open_args comment. Reported

drbrain	2012-01-14 06:59:36 +0900 (Sat, 14 Jan 2012)

  New Revision: 34296

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

  Log:
    * io.c (rb_io_s_read):  Fix formatting of open_args comment.  Reported
      by Adam Prescott.

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34295)
+++ ChangeLog	(revision 34296)
@@ -1,3 +1,8 @@
+Sat Jan 14 05:58:54 2012  Eric Hodel  <drbrain@s...>
+
+	* io.c (rb_io_s_read):  Fix formatting of open_args comment.  Reported
+	  by Adam Prescott.
+
 Fri Jan 13 18:41:19 2012  Nobuyoshi Nakada  <nobu@r...>
 
 	* sprintf.c (rb_enc_vsprintf): can be used for ASCII compatible
Index: io.c
===================================================================
--- io.c	(revision 34295)
+++ io.c	(revision 34296)
@@ -9025,31 +9025,35 @@
  *     IO.read(name, [length [, offset]] )   -> string
  *     IO.read(name, [length [, offset]], open_args)   -> string
  *
- *  Opens the file, optionally seeks to the given <i>offset</i>, then returns
- *  <i>length</i> bytes (defaulting to the rest of the file).
- *  <code>read</code> ensures the file is closed before returning.
+ *  Opens the file, optionally seeks to the given +offset+, then returns
+ *  +length+ bytes (defaulting to the rest of the file).  <code>read</code>
+ *  ensures the file is closed before returning.
  *
  *  If the last argument is a hash, it specifies option for internal
  *  open().  The key would be the following.  open_args: is exclusive
  *  to others.
  *
- *   encoding: string or encoding
+ *  encoding::
+ *    string or encoding
  *
- *    specifies encoding of the read string.  encoding will be ignored
+ *    specifies encoding of the read string.  +encoding+ will be ignored
  *    if length is specified.
  *
- *   mode: string
+ *  mode::
+ *    string
  *
- *    specifies mode argument for open().  it should start with "r"
- *    otherwise it would cause error.
+ *    specifies mode argument for open().  It should start with "r"
+ *    otherwise it will cause an error.
  *
- *   open_args: array of strings
+ *  open_args:: array of strings
  *
  *    specifies arguments for open() as an array.
  *
- *     IO.read("testfile")           #=> "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
- *     IO.read("testfile", 20)       #=> "This is line one\nThi"
- *     IO.read("testfile", 20, 10)   #=> "ne one\nThis is line "
+ *  Examples:
+ *
+ *    IO.read("testfile")           #=> "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
+ *    IO.read("testfile", 20)       #=> "This is line one\nThi"
+ *    IO.read("testfile", 20, 10)   #=> "ne one\nThis is line "
  */
 
 static VALUE

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

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