From bbf440c90b036c733729b1a5c996978ac2adaa9d Mon Sep 17 00:00:00 2001 From: hsbt Date: Wed, 17 Jun 2015 05:29:51 +0000 Subject: * include/ruby/ruby.h: $SAFE=3 is now obsolete. * ext/socket/init.c, ext/socket/socket.c, ext/socket/tcpsocket.c ext/socket/udpsocket.c, gc.c, object.c, re.c, safe.c: removed code for $SAFE=3 * bootstraptest/test_method.rb, test/erb/test_erb.rb, test/ruby/test_dir.rb test/ruby/test_file.rb, test/ruby/test_method.rb, test/ruby/test_regexp.rb test/ruby/test_thread.rb: remove tests for $SAFE=3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/socket.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'ext/socket/socket.c') diff --git a/ext/socket/socket.c b/ext/socket/socket.c index f2d4323a89..2cda4cbaf5 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -140,7 +140,6 @@ sock_initialize(int argc, VALUE *argv, VALUE sock) if (NIL_P(protocol)) protocol = INT2FIX(0); - rb_secure(3); setup_domain_and_type(domain, &d, type, &t); fd = rsock_socket(d, t, NUM2INT(protocol)); if (fd < 0) rb_sys_fail("socket(2)"); @@ -1059,7 +1058,6 @@ sock_gethostname(VALUE obj) char buf[RUBY_MAX_HOST_NAME_LEN+1]; - rb_secure(3); if (gethostname(buf, (int)sizeof buf - 1) < 0) rb_sys_fail("gethostname(3)"); @@ -1076,7 +1074,6 @@ sock_gethostname(VALUE obj) { struct utsname un; - rb_secure(3); uname(&un); return rb_str_new2(un.nodename); } @@ -1143,7 +1140,6 @@ sock_sockaddr(struct sockaddr *addr, socklen_t len) static VALUE sock_s_gethostbyname(VALUE obj, VALUE host) { - rb_secure(3); return rsock_make_hostent(host, rsock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr); } -- cgit v1.2.3