diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-12-19 07:48:32 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-12-19 07:48:32 +0000 |
commit | 28aeaa6f674e420c1bf2c35cbe0bf566b7f01de7 (patch) | |
tree | ead300989db37caf61cb6dce6c37b9144ff84945 /io.c | |
parent | f2a5cf2254c66a196219d4f38e608ce46be08c46 (diff) | |
download | ruby-28aeaa6f674e420c1bf2c35cbe0bf566b7f01de7.tar.gz ruby-28aeaa6f674e420c1bf2c35cbe0bf566b7f01de7.tar.xz ruby-28aeaa6f674e420c1bf2c35cbe0bf566b7f01de7.zip |
* eval.c (rb_mod_define_method): define_method should follow
default method visibility.
* eval.c (rb_attr): should warn if the default method visibility
is "module_function" (can be error).
* eval.c (rb_mod_define_method): should define class/module method
also if the visibility is "module_function".
* eval.c (rb_mod_define_method): should call hook method
"method_added", and "singleton_method_added".
* string.c: use RESIZE_CAPA for capacity change.
* ext/socket/socket.c (Init_socket): add listen method to
TCPServer and UNIXServer.
* ext/socket/socket.c (bsock_send): should raise EWOULDBLOCK
exception.
* ext/socket/socket.c (s_recvfrom): ditto.
* ext/socket/socket.c (s_accept): ditto.
* ext/socket/socket.c (udp_send): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -512,11 +512,16 @@ io_fread(ptr, len, f) if (c == EOF) { eof: if (ferror(f)) { - if (errno == EINTR) continue; - if (errno == EAGAIN) return len - n; + switch (errno) { + case EINTR: + continue; + + case EAGAIN: #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN - if (errno == EWOULDBLOCK) return len - n; + case EWOULDBLOCK: #endif + return len - n; + } rb_sys_fail(0); } *ptr = '\0'; |