diff --git a/ChangeLog b/ChangeLog index bd06ed136b..276850dad1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jun 19 02:10:32 2006 Yukihiro Matsumoto + + * ext/socket/socket.c (tcp_accept_nonblock): forgot to remove + abandoned hacks. [ruby-dev:28740] + Mon Jun 19 00:00:17 2006 Hidetoshi NAGAI * ext/tk/lib/multi-tk.rb: fix bug: initialize improper tables. @@ -28,6 +33,11 @@ Sat Jun 17 23:42:26 2006 Yukihiro Matsumoto * ext/socket/socket.c: protoize. +Sat Jun 17 22:17:17 2006 Yukihiro Matsumoto + + * lib/mathn.rb (Integer::prime_division): raise ZeroDivisionError + on zeros. [ruby-dev:28739] + Sat Jun 17 14:53:32 2006 Tanaka Akira * lib/pathname.rb (Kernel#Pathname): new method. diff --git a/ext/socket/socket.c b/ext/socket/socket.c index aedadd09f7..b7c2d977fa 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -1467,16 +1467,11 @@ tcp_accept_nonblock(VALUE sock) OpenFile *fptr; struct sockaddr_storage from; socklen_t fromlen; - VALUE client; GetOpenFile(sock, fptr); fromlen = sizeof(from); - client = s_accept_nonblock(rb_cTCPSocket, fptr, - (struct sockaddr *)&from, &fromlen); - if (rb_block_given_p()) { - return sock_yield(client); - } - return client; + return s_accept_nonblock(rb_cTCPSocket, fptr, + (struct sockaddr *)&from, &fromlen); } static VALUE @@ -1485,15 +1480,10 @@ tcp_sysaccept(VALUE sock) OpenFile *fptr; struct sockaddr_storage from; socklen_t fromlen; - VALUE client; GetOpenFile(sock, fptr); fromlen = sizeof(from); - client = s_accept(0, fptr->fd, (struct sockaddr*)&from, &fromlen); - if (rb_block_given_p()) { - return sock_yield(client); - } - return client; + return s_accept(0, fptr->fd, (struct sockaddr*)&from, &fromlen); } #ifdef HAVE_SYS_UN_H