summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-13 21:59:36 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-13 21:59:36 +0000
commit90943649fe9fa474d6404acc3b9915e0388a14b5 (patch)
tree408df6be02381ad3a6046458a673937a59b67572 /io.c
parent23b4c10dd8dcde2b955072ef0f014bb291866e89 (diff)
* io.c (rb_io_s_read): Fix formatting of open_args comment. Reported
by Adam Prescott. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/io.c b/io.c
index f6252e2f48..80ec74118b 100644
--- a/io.c
+++ b/io.c
@@ -9025,31 +9025,35 @@ seek_before_access(VALUE argp)
* 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