summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--io.c6
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index d11136445..254b03ad4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Jan 9 14:12:17 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (rb_f_select): IO list could be altered. [ruby-dev:25312]
+
Sun Jan 9 04:08:40 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
* test/webrick/test_server.rb (test_daemon): delete an assertion
@@ -26,10 +30,10 @@ Fri Jan 7 20:01:31 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
- should delete trailing LF from the result of pack("m*").
- clear Request-Line not to send the response by HTTPServer#run.
- * lib/webrick/httputils (WEBrick::HTTPUtils.parse_qvalues):
+ * lib/webrick/httputils (WEBrick::HTTPUtils.parse_qvalues):
refine regexp (and change the name of a local variable).
- * lib/webrick/server.rb (WEBrick::Daemon.start): prepared stdio
+ * lib/webrick/server.rb (WEBrick::Daemon.start): prepared stdio
don't allow changing its mode.
* test/webrick/*, sample/webrick/httpproxy.rb: add new files.
diff --git a/io.c b/io.c
index 9c2fcddf6..b2496b7b1 100644
--- a/io.c
+++ b/io.c
@@ -4597,7 +4597,7 @@ rb_f_select(argc, argv, obj)
GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
if (FD_ISSET(fptr->fd, rp)
|| FD_ISSET(fptr->fd, &pset)) {
- rb_ary_push(list, RARRAY(read)->ptr[i]);
+ rb_ary_push(list, rb_ary_entry(read, i));
}
}
}
@@ -4607,7 +4607,7 @@ rb_f_select(argc, argv, obj)
for (i=0; i< RARRAY(write)->len; i++) {
GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
if (FD_ISSET(fptr->fd, wp)) {
- rb_ary_push(list, RARRAY(write)->ptr[i]);
+ rb_ary_push(list, rb_ary_entry(write, i));
}
}
}
@@ -4617,7 +4617,7 @@ rb_f_select(argc, argv, obj)
for (i=0; i< RARRAY(except)->len; i++) {
GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
if (FD_ISSET(fptr->fd, ep)) {
- rb_ary_push(list, RARRAY(except)->ptr[i]);
+ rb_ary_push(list, rb_ary_entry(except, i));
}
}
}