[前][次][番号順一覧][スレッド一覧]

ruby-changes:7984

From: matz <ko1@a...>
Date: Wed, 24 Sep 2008 11:33:04 +0900 (JST)
Subject: [ruby-changes:7984] Ruby:r19507 (trunk): * io.c (rb_io_s_binread): offset argument was wrongly passed to

matz	2008-09-24 11:31:12 +0900 (Wed, 24 Sep 2008)

  New Revision: 19507

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19507

  Log:
    * io.c (rb_io_s_binread): offset argument was wrongly passed to
      internal IO#read call.  [ruby-core:18810]

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19506)
+++ ChangeLog	(revision 19507)
@@ -1,3 +1,8 @@
+Wed Sep 24 11:18:33 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* io.c (rb_io_s_binread): offset argument was wrongly passed to
+	  internal IO#read call.  [ruby-core:18810]
+
 Wed Sep 24 07:38:23 2008  URABE Shyouhei  <shyouhei@r...>
 
 	* vm_core.h: ruby/ruby.h should be included at the very first
Index: io.c
===================================================================
--- io.c	(revision 19506)
+++ io.c	(revision 19507)
@@ -7006,7 +7006,7 @@
     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);
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]