diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-09 05:12:29 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-09 05:12:29 +0000 |
| commit | 77df5c7db4512928a60d9357894d84fb24a62269 (patch) | |
| tree | df67ee03a34c524b26aebc2201a5c5fb63b25b76 | |
| parent | ecf298f30f946990f1a61cdc80cb16393b3fde8d (diff) | |
| download | ruby-77df5c7db4512928a60d9357894d84fb24a62269.tar.gz ruby-77df5c7db4512928a60d9357894d84fb24a62269.tar.xz ruby-77df5c7db4512928a60d9357894d84fb24a62269.zip | |
* io.c (rb_f_select): IO list could be altered. [ruby-dev:25312]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 8 | ||||
| -rw-r--r-- | io.c | 6 |
2 files changed, 9 insertions, 5 deletions
@@ -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. @@ -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)); } } } |
