1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/basicsocket.c, ext/socket/sockssocket.c:

remove code for $SAFE=4.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ktsj 2014-12-07 10:40:27 +00:00
parent c63800069b
commit eebb6bfc79
3 changed files with 5 additions and 12 deletions

View file

@ -41,9 +41,6 @@ socks_s_close(VALUE sock)
{
rb_io_t *fptr;
if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
rb_raise(rb_eSecurityError, "Insecure: can't close socket");
}
GetOpenFile(sock, fptr);
shutdown(fptr->fd, 2);
return rb_io_close(sock);