summaryrefslogtreecommitdiffstats
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-26 06:18:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-26 06:18:51 +0000
commit75da83b211c45b138a637ce268db1b1a6200e936 (patch)
tree7fe61bfc98a1864e7e68ac8e5b6e9f7bd7195afc /ext/socket/socket.c
parent0bcf387286e7ff232a65c34639cae2ece0908264 (diff)
downloadruby-75da83b211c45b138a637ce268db1b1a6200e936.tar.gz
ruby-75da83b211c45b138a637ce268db1b1a6200e936.tar.xz
ruby-75da83b211c45b138a637ce268db1b1a6200e936.zip
* parse.y (primary): while/until statement modifiers to "begin"
statement now work as "do .. while" even when begin statement has "rescue" or "ensure" [new]. * parse.y (bodystmt): rescue/ensure is allowed at every bodies, i.e. method bodies, begin bodies, class bodies[new], and module bodies[new]. * ext/socket/socket.c (sock_addrinfo): should specify ai_socktype for getaddrinfo hints. * eval.c (rb_f_abort): embed aborting message into exception object [new]. * eval.c (terminate_process): utility function for exit and abort. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 54d181958..601455e87 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -591,6 +591,7 @@ sock_addrinfo(host, port, flags)
MEMZERO(&hints, struct addrinfo, 1);
hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = flags;
error = getaddrinfo(hostp, portp, &hints, &res);
if (error) {