diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-24 02:31:12 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-24 02:31:12 +0000 |
commit | 9bf27f6b1745e7f91eb3789aba0e229950dabab4 (patch) | |
tree | d605104dc242c5463cdeb33a6455728c64d4e3a8 /io.c | |
parent | 705b8b41eb5b01d6ce626e598c7116d0596bd5ba (diff) | |
download | ruby-9bf27f6b1745e7f91eb3789aba0e229950dabab4.tar.gz |
* io.c (rb_io_s_binread): offset argument was wrongly passed to
internal IO#read call. [ruby-core:18810]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -7006,7 +7006,7 @@ rb_io_s_binread(int argc, VALUE *argv, VALUE io) arg.io = rb_io_open(argv[0], rb_str_new_cstr("rb:ASCII-8BIT"), Qnil, Qnil); if (NIL_P(arg.io)) return Qnil; arg.argv = argv+1; - arg.argc = (argc > 2) ? 2 : argc; + arg.argc = (argc > 1) ? 1 : 0; if (!NIL_P(offset)) { rb_io_seek(arg.io, offset, SEEK_SET); } |