diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-06 01:06:57 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-06 01:06:57 +0000 |
commit | 127cfd117400b84ff5ab9102f6c9a57895c375b5 (patch) | |
tree | d7d2cf6f7d6358852ffcf503f11d8270ab21aff7 /io.c | |
parent | 61337683b38fa28490b9d209ee3e8821f6a77050 (diff) |
* io.c (rb_io_s_binwrite): use mode "r+b" instead of "ab" to handle
offset correctly. [ruby-core:28517]
* test/ruby/test_io.rb: use assert_equal instead of assert.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -8025,7 +8025,7 @@ rb_io_s_binwrite(int argc, VALUE *argv, VALUE io) rb_scan_args(argc, argv, "21", NULL, &warg.str, &offset); if (!NIL_P(offset)) { NUM2OFFT(offset); - mode = "ab:ASCII-8BIT"; + mode = "r+b:ASCII-8BIT"; } else { mode = "wb:ASCII-8BIT"; |