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 | c744d6f62dcb536e58ded4a79eec1987880bc23c (patch) | |
tree | df67ee03a34c524b26aebc2201a5c5fb63b25b76 | |
parent | 7011bf152338c065f653996af7f2513f8f64de6b (diff) | |
download | ruby-c744d6f62dcb536e58ded4a79eec1987880bc23c.tar.gz |
* 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
-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)); } } } |