summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-03 04:27:56 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-03 04:27:56 +0000
commit4d42277823dc334b119d84376f5812c76691ac8a (patch)
tree39e1b01c14fda845cac0bee3479b6601f4a3e441 /io.c
parentdbfb5deab64a8b929b77361b132cd4cad4f8ce10 (diff)
* io.c (IO#new):
Documentation for IO#open modes and formatting [ruby-core#48052] [Bug #7179] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/io.c b/io.c
index aadd8ecb5b..a259058fa9 100644
--- a/io.c
+++ b/io.c
@@ -6962,31 +6962,32 @@ rb_io_stdio_file(rb_io_t *fptr)
*
* Ruby allows the following open modes:
*
- * "r" :: Read-only, starts at beginning of file (default mode).
+ * "r" Read-only, starts at beginning of file (default mode).
*
- * "r+" :: Read-write, starts at beginning of file.
+ * "r+" Read-write, starts at beginning of file.
*
- * "w" :: Write-only, truncates existing file
- * to zero length or creates a new file for writing.
+ * "w" Write-only, truncates existing file
+ * to zero length or creates a new file for writing.
*
- * "w+" :: Read-write, truncates existing file to zero length
- * or creates a new file for reading and writing.
+ * "w+" Read-write, truncates existing file to zero length
+ * or creates a new file for reading and writing.
*
- * "a" :: Write-only, starts at end of file if file exists,
- * otherwise creates a new file for writing.
+ * "a" Write-only, starts at end of file if file exists,
+ * otherwise creates a new file for writing.
*
- * "a+" :: Read-write, starts at end of file if file exists,
- * otherwise creates a new file for reading and
- * writing.
+ * "a+" Read-write, starts at end of file if file exists,
+ * otherwise creates a new file for reading and
+ * writing.
*
- * "b" :: Binary file mode (may appear with
- * any of the key letters listed above).
- * Suppresses EOL <-> CRLF conversion on Windows. And
- * sets external encoding to ASCII-8BIT unless explicitly
- * specified.
+ * The following modes must be used separately, and along with one or more of
+ * the modes seen above.
*
- * "t" :: Text file mode (may appear with
- * any of the key letters listed above except "b").
+ * "b" Binary file mode
+ * Suppresses EOL <-> CRLF conversion on Windows. And
+ * sets external encoding to ASCII-8BIT unless explicitly
+ * specified.
+ *
+ * "t" Text file mode
*
* When the open mode of original IO is read only, the mode cannot be
* changed to be writable. Similarly, the open mode cannot be changed from