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

ruby-changes:2879

From: ko1@a...
Date: 21 Dec 2007 01:13:00 +0900
Subject: [ruby-changes:2879] gotoyuzo - Ruby:r14370 (trunk): * io.c (select_internal): should return original value.

gotoyuzo	2007-12-21 01:12:38 +0900 (Fri, 21 Dec 2007)

  New Revision: 14370

  Modified files:
    trunk/ChangeLog
    trunk/io.c

  Log:
    * io.c (select_internal): should return original value.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14370&r2=14369
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=14370&r2=14369

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14369)
+++ ChangeLog	(revision 14370)
@@ -1,3 +1,7 @@
+Fri Dec 21 01:11:37 2007  GOTOU Yuuzou  <gotoyuzo@n...>
+
+	* io.c (select_internal): should return original value.
+
 Fri Dec 21 00:26:39 2007  Yukihiro Matsumoto  <matz@r...>
 
 	* string.c (tr_trans): wrong encoding check for tree strings.
Index: io.c
===================================================================
--- io.c	(revision 14369)
+++ io.c	(revision 14370)
@@ -5069,11 +5069,12 @@
 	if (rp) {
 	    list = RARRAY_PTR(res)[0];
 	    for (i=0; i< RARRAY_LEN(read); i++) {
-                VALUE io = rb_io_get_io(rb_ary_entry(read, i));
+                VALUE obj = rb_ary_entry(read, i);
+                VALUE io = rb_io_get_io(obj);
 		GetOpenFile(io, fptr);
 		if (rb_fd_isset(fptr->fd, &fds[0]) ||
 		    rb_fd_isset(fptr->fd, &fds[3])) {
-		    rb_ary_push(list, io);
+		    rb_ary_push(list, obj);
 		}
 	    }
 	}
@@ -5081,11 +5082,12 @@
 	if (wp) {
 	    list = RARRAY_PTR(res)[1];
 	    for (i=0; i< RARRAY_LEN(write); i++) {
-                VALUE io = rb_io_get_io(rb_ary_entry(write, i));
+                VALUE obj = rb_ary_entry(write, i);
+                VALUE io = rb_io_get_io(obj);
                 VALUE write_io = GetWriteIO(io);
 		GetOpenFile(write_io, fptr);
 		if (rb_fd_isset(fptr->fd, &fds[1])) {
-		    rb_ary_push(list, io);
+		    rb_ary_push(list, obj);
 		}
 	    }
 	}
@@ -5093,16 +5095,17 @@
 	if (ep) {
 	    list = RARRAY_PTR(res)[2];
 	    for (i=0; i< RARRAY_LEN(except); i++) {
-                VALUE io = rb_io_get_io(rb_ary_entry(write, i));
+                VALUE obj = rb_ary_entry(write, i);
+                VALUE io = rb_io_get_io(obj);
                 VALUE write_io = GetWriteIO(io);
 		GetOpenFile(io, fptr);
 		if (rb_fd_isset(fptr->fd, &fds[2])) {
-		    rb_ary_push(list, io);
+		    rb_ary_push(list, obj);
 		}
                 else if (io != write_io) {
                     GetOpenFile(write_io, fptr);
                     if (rb_fd_isset(fptr->fd, &fds[2])) {
-                        rb_ary_push(list, io);
+                        rb_ary_push(list, obj);
                     }
                 }
 	    }

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

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