From 5494f0bdba6e203e13a4db471ab156608cfe7fbf Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 24 Sep 2008 02:31:12 +0000 Subject: * io.c (rb_io_s_binread): offset argument was wrongly passed to internal IO#read call. [ruby-core:18810] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io.c') diff --git a/io.c b/io.c index 48b1025c6..f5e0b0d76 100644 --- a/io.c +++ b/io.c @@ -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); } -- cgit