diff options
Diffstat (limited to 'ext/socket/unixsocket.c')
-rw-r--r-- | ext/socket/unixsocket.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c index a09f2b927e..84897ce51d 100644 --- a/ext/socket/unixsocket.c +++ b/ext/socket/unixsocket.c @@ -463,6 +463,7 @@ unix_s_socketpair(int argc, VALUE *argv, VALUE klass) { VALUE domain, type, protocol; domain = INT2FIX(PF_UNIX); + VALUE args[3]; rb_scan_args(argc, argv, "02", &type, &protocol); if (argc == 0) @@ -470,7 +471,11 @@ unix_s_socketpair(int argc, VALUE *argv, VALUE klass) if (argc <= 1) protocol = INT2FIX(0); - return sock_s_socketpair(klass, domain, type, protocol); + args[0] = domain; + args[1] = type; + args[2] = protocol; + + return sock_s_socketpair(3, args, klass); } #endif |