summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/init.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f2ef0e2216..6fb575a9a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jul 19 14:18:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/socket/init.c (rsock_init_sock): need to update max fd on all
+ platforms.
+
Thu Jul 19 14:15:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread.c (rb_gc_mark_threads): remove deprecated function.
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 990f1a4d6b..696b62d82a 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -52,6 +52,7 @@ rsock_init_sock(VALUE sock, int fd)
if (!S_ISSOCK(sbuf.st_mode))
rb_raise(rb_eArgError, "not a socket file descriptor");
#else
+ rb_update_max_fd(fd);
if (!rb_w32_is_socket(fd))
rb_raise(rb_eArgError, "not a socket file descriptor");
#endif