1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* io.c (rb_f_select): IO list could be altered. [ruby-dev:25312]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-01-09 05:12:29 +00:00
parent 7011bf1523
commit c744d6f62d
2 changed files with 9 additions and 5 deletions

View file

@ -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.

6
io.c
View file

@ -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));
}
}
}