diff options
author | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-11 06:49:49 +0000 |
---|---|---|
committer | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-11 06:49:49 +0000 |
commit | 605f4baef74582341397b02bc3ac00eddeaf4581 (patch) | |
tree | cf295c3b606afb57d05eabf54b33ded0de85a7a4 /io.c | |
parent | 290f7cd7c0103ec9d50380cf15bcae7d651075c8 (diff) |
* 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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -9246,18 +9246,11 @@ rb_io_s_write(int argc, VALUE *argv, VALUE io) /* * 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 |