summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-30 15:21:40 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-30 15:21:40 +0000
commit7fc07bc706f8b5c5509094cf9a0a6451a99fb2a8 (patch)
tree4317d5716f802b5799bc0e47ab90e70ee9d3554e
parentfb6e371ea66c52f7a6df1e480e19bd1baf9f0e14 (diff)
downloadruby-7fc07bc706f8b5c5509094cf9a0a6451a99fb2a8.tar.gz
ruby-7fc07bc706f8b5c5509094cf9a0a6451a99fb2a8.tar.xz
ruby-7fc07bc706f8b5c5509094cf9a0a6451a99fb2a8.zip
* io.c (select_internal): fix SEGV by `select [STDIN],nil,[STDIN]'.
fixed by Petr Chromec. http://rubyforge.org/tracker/index.php?func=detail&aid=17275&group_id=426&atid=1698 git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--io.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b355a1a8d..fd81b1a85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jan 31 00:01:51 2008 Tanaka Akira <akr@fsij.org>
+
+ * io.c (select_internal): fix SEGV by `select [STDIN],nil,[STDIN]'.
+ fixed by Petr Chromec.
+ http://rubyforge.org/tracker/index.php?func=detail&aid=17275&group_id=426&atid=1698
+
Wed Jan 30 17:32:49 2008 NARUSE, Yui <naruse@ruby-lang.org>
* enc/*.c: add GB12345, UCS-{2,4}{BE,LE}.
diff --git a/io.c b/io.c
index 3a58fdee9..32a37df3c 100644
--- a/io.c
+++ b/io.c
@@ -5316,7 +5316,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
if (ep) {
list = RARRAY_PTR(res)[2];
for (i=0; i< RARRAY_LEN(except); i++) {
- VALUE obj = rb_ary_entry(write, i);
+ VALUE obj = rb_ary_entry(except, i);
VALUE io = rb_io_get_io(obj);
VALUE write_io = GetWriteIO(io);
GetOpenFile(io, fptr);