summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/extconf.rb2
-rw-r--r--ext/socket/socket.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index c5489a9535..f72ac2ba42 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -359,7 +359,7 @@ if have_func(test_func)
unless have_func("gethostname")
have_func("uname")
end
- if ENV["SOCKS_SERVER"] or enable_config("socks", false)
+ if enable_config("socks", ENV["SOCKS_SERVER"])
if have_library("socks5", "SOCKSinit")
$CFLAGS+=" -DSOCKS5 -DSOCKS"
elsif have_library("socks", "Rconnect")
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 9b1bf7fe39..5c78901772 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1013,7 +1013,7 @@ socks_init(sock, host, serv)
init = 1;
}
- return init_inetsock(class, host, serv, Qnil, Qnil, INET_SOCKS);
+ return init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS);
}
#ifdef SOCKS5