ruby-changes:34829
From: nagachika <ko1@a...>
Date: Wed, 23 Jul 2014 23:49:18 +0900 (JST)
Subject: [ruby-changes:34829] nagachika:r46912 (ruby_2_1): merge revision(s) r45034, r45037:
nagachika 2014-07-23 23:49:07 +0900 (Wed, 23 Jul 2014) New Revision: 46912 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46912 Log: merge revision(s) r45034,r45037: * test/socket/test_addrinfo.rb: remove unused variables. * test/socket/test_nonblock.rb: ditto. * test/socket/test_socket.rb: ditto. * test/socket/test_unix.rb: ditto. * test/testunit/test_parallel.rb: ditto. * test/webrick/test_filehandler.rb: ditto. * test/xmlrpc/test_features.rb: ditto. * test/zlib/test_zlib.rb: ditto. * test/socket/test_socket.rb: unix socket is required by test case. Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/ChangeLog branches/ruby_2_1/test/socket/test_addrinfo.rb branches/ruby_2_1/test/socket/test_nonblock.rb branches/ruby_2_1/test/socket/test_socket.rb branches/ruby_2_1/test/socket/test_unix.rb branches/ruby_2_1/test/testunit/test_parallel.rb branches/ruby_2_1/test/webrick/test_filehandler.rb branches/ruby_2_1/test/xmlrpc/test_features.rb branches/ruby_2_1/test/zlib/test_zlib.rb branches/ruby_2_1/version.h Index: ruby_2_1/ChangeLog =================================================================== --- ruby_2_1/ChangeLog (revision 46911) +++ ruby_2_1/ChangeLog (revision 46912) @@ -1,3 +1,18 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1 +Wed Jul 23 23:11:28 2014 SHIBATA Hiroshi <shibata.hiroshi@g...> + + * test/socket/test_socket.rb: unix socket is required by test case. + +Wed Jul 23 23:11:28 2014 SHIBATA Hiroshi <shibata.hiroshi@g...> + + * test/socket/test_addrinfo.rb: remove unused variables. + * test/socket/test_nonblock.rb: ditto. + * test/socket/test_socket.rb: ditto. + * test/socket/test_unix.rb: ditto. + * test/testunit/test_parallel.rb: ditto. + * test/webrick/test_filehandler.rb: ditto. + * test/xmlrpc/test_features.rb: ditto. + * test/zlib/test_zlib.rb: ditto. + Wed Jul 23 23:05:19 2014 Tanaka Akira <akr@f...> * ext/pathname/lib/pathname.rb (cleanpath_aggressive): make all Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 46911) +++ ruby_2_1/version.h (revision 46912) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.2" #define RUBY_RELEASE_DATE "2014-07-23" -#define RUBY_PATCHLEVEL 180 +#define RUBY_PATCHLEVEL 181 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 7 Index: ruby_2_1/test/zlib/test_zlib.rb =================================================================== --- ruby_2_1/test/zlib/test_zlib.rb (revision 46911) +++ ruby_2_1/test/zlib/test_zlib.rb (revision 46912) @@ -162,7 +162,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/zlib/test_zlib.rb#L162 assert_equal(false, z.closed?) z << "foo" assert_equal(false, z.closed?) - s = z.finish + z.finish assert_equal(false, z.closed?) z.close assert_equal(true, z.closed?) @@ -309,9 +309,6 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/zlib/test_zlib.rb#L309 def test_inflate_partial_input deflated = Zlib::Deflate.deflate "\0" - a = deflated[0...2] - b = deflated[2..-1] - z = Zlib::Inflate.new inflated = "" Index: ruby_2_1/test/xmlrpc/test_features.rb =================================================================== --- ruby_2_1/test/xmlrpc/test_features.rb (revision 46911) +++ ruby_2_1/test/xmlrpc/test_features.rb (revision 46912) @@ -16,11 +16,11 @@ class Test_Features < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/xmlrpc/test_features.rb#L16 XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_CREATE)} XMLRPC::Config.const_set(:ENABLE_NIL_CREATE, false) - assert_raise(RuntimeError) { str = c.methodCall("test", *@params) } + assert_raise(RuntimeError) { c.methodCall("test", *@params) } XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_CREATE)} XMLRPC::Config.const_set(:ENABLE_NIL_CREATE, true) - assert_nothing_raised { str = c.methodCall("test", *@params) } + assert_nothing_raised { c.methodCall("test", *@params) } end end Index: ruby_2_1/test/testunit/test_parallel.rb =================================================================== --- ruby_2_1/test/testunit/test_parallel.rb (revision 46911) +++ ruby_2_1/test/testunit/test_parallel.rb (revision 46912) @@ -90,7 +90,6 @@ module TestParallel https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/testunit/test_parallel.rb#L90 def test_done timeout(10) do @worker_in.puts "run #{TESTS}/ptest_forth.rb test" - i = 0 6.times { @worker_out.gets } buf = @worker_out.gets assert_match(/^done (.+?)$/, buf) Index: ruby_2_1/test/webrick/test_filehandler.rb =================================================================== --- ruby_2_1/test/webrick/test_filehandler.rb (revision 46911) +++ ruby_2_1/test/webrick/test_filehandler.rb (revision 46912) @@ -184,7 +184,6 @@ class WEBrick::TestFileHandler < Test::U https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/webrick/test_filehandler.rb#L184 def test_directory_traversal config = { :DocumentRoot => File.dirname(__FILE__), } - this_file = File.basename(__FILE__) TestWEBrick.start_httpserver(config) do |server, addr, port, log| http = Net::HTTP.new(addr, port) req = Net::HTTP::Get.new("/../../") @@ -199,7 +198,6 @@ class WEBrick::TestFileHandler < Test::U https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/webrick/test_filehandler.rb#L198 def test_unwise_in_path if windows? config = { :DocumentRoot => File.dirname(__FILE__), } - this_file = File.basename(__FILE__) TestWEBrick.start_httpserver(config) do |server, addr, port, log| http = Net::HTTP.new(addr, port) req = Net::HTTP::Get.new("/..%5c..") Index: ruby_2_1/test/socket/test_unix.rb =================================================================== --- ruby_2_1/test/socket/test_unix.rb (revision 46911) +++ ruby_2_1/test/socket/test_unix.rb (revision 46912) @@ -53,7 +53,7 @@ class TestSocket_UNIXSocket < Test::Unit https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_unix.rb#L53 end assert_equal(1, ret) ret = s2.recvmsg(:scm_rights=>true) - data, srcaddr, flags, *ctls = ret + _, _, _, *ctls = ret recv_io_ary = [] ctls.each {|ctl| next if ctl.level != Socket::SOL_SOCKET || ctl.type != Socket::SCM_RIGHTS @@ -90,7 +90,7 @@ class TestSocket_UNIXSocket < Test::Unit https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_unix.rb#L90 end assert_equal(1, ret) ret = s2.recvmsg(:scm_rights=>true) - data, srcaddr, flags, *ctls = ret + _, _, _, *ctls = ret recv_io_ary = [] ctls.each {|ctl| next if ctl.level != Socket::SOL_SOCKET || ctl.type != Socket::SCM_RIGHTS @@ -422,7 +422,6 @@ class TestSocket_UNIXSocket < Test::Unit https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_unix.rb#L422 end def test_unix_socket_pair_close_on_exec - pair = nil UNIXSocket.pair {|s1, s2| assert(s1.close_on_exec?) assert(s2.close_on_exec?) @@ -465,7 +464,7 @@ class TestSocket_UNIXSocket < Test::Unit https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_unix.rb#L464 Dir.mktmpdir {|d| sockpath = "#{d}/sock" serv = Socket.unix_server_socket(sockpath) - c = Socket.unix(sockpath) + Socket.unix(sockpath) s, = serv.accept cred = s.getsockopt(:SOCKET, :PEERCRED) inspect = cred.inspect @@ -481,7 +480,7 @@ class TestSocket_UNIXSocket < Test::Unit https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_unix.rb#L480 Dir.mktmpdir {|d| sockpath = "#{d}/sock" serv = Socket.unix_server_socket(sockpath) - c = Socket.unix(sockpath) + Socket.unix(sockpath) s, = serv.accept cred = s.getsockopt(0, Socket::LOCAL_PEERCRED) inspect = cred.inspect @@ -499,7 +498,7 @@ class TestSocket_UNIXSocket < Test::Unit https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_unix.rb#L498 s, = serv.accept s.setsockopt(:SOCKET, :PASSCRED, 1) c.print "a" - msg, cliend_ai, rflags, cred = s.recvmsg + msg, _, _, cred = s.recvmsg inspect = cred.inspect assert_equal("a", msg) assert_match(/ pid=#{$$} /, inspect) @@ -518,7 +517,7 @@ class TestSocket_UNIXSocket < Test::Unit https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_unix.rb#L517 s, = serv.accept s.setsockopt(0, Socket::LOCAL_CREDS, 1) c.print "a" - msg, cliend_ai, rflags, cred = s.recvmsg + msg, _, _, cred = s.recvmsg assert_equal("a", msg) inspect = cred.inspect assert_match(/ uid=#{Process.uid} /, inspect) @@ -537,7 +536,7 @@ class TestSocket_UNIXSocket < Test::Unit https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_unix.rb#L536 c = Socket.unix(sockpath) s, = serv.accept c.sendmsg("a", 0, nil, [:SOCKET, Socket::SCM_CREDS, ""]) - msg, cliend_ai, rflags, cred = s.recvmsg + msg, _, _, cred = s.recvmsg assert_equal("a", msg) inspect = cred.inspect assert_match(/ pid=#{$$} /, inspect) Index: ruby_2_1/test/socket/test_nonblock.rb =================================================================== --- ruby_2_1/test/socket/test_nonblock.rb (revision 46911) +++ ruby_2_1/test/socket/test_nonblock.rb (revision 46912) @@ -64,8 +64,8 @@ class TestSocketNonblock < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_nonblock.rb#L64 mesg, inet_addr = u1.recvfrom_nonblock(100) assert_equal(4, inet_addr.length) assert_equal("aaa", mesg) - af, port, host, addr = inet_addr - u2_port, u2_addr = Socket.unpack_sockaddr_in(u2.getsockname) + _, port, _, _ = inet_addr + u2_port, _ = Socket.unpack_sockaddr_in(u2.getsockname) assert_equal(u2_port, port) assert_raise(IO::WaitReadable) { u1.recvfrom_nonblock(100) } u2.send("", 0, u1.getsockname) @@ -111,8 +111,8 @@ class TestSocketNonblock < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_nonblock.rb#L111 IO.select [s1] mesg, sockaddr = s1.recvfrom_nonblock(100) assert_equal("aaa", mesg) - port, addr = Socket.unpack_sockaddr_in(sockaddr) - s2_port, s2_addr = Socket.unpack_sockaddr_in(s2.getsockname) + port, _ = Socket.unpack_sockaddr_in(sockaddr) + s2_port, _ = Socket.unpack_sockaddr_in(s2.getsockname) assert_equal(s2_port, port) ensure s1.close if s1 @@ -121,7 +121,7 @@ class TestSocketNonblock < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_nonblock.rb#L121 def tcp_pair serv = TCPServer.new("127.0.0.1", 0) - af, port, host, addr = serv.addr + _, port, _, addr = serv.addr c = TCPSocket.new(addr, port) s = serv.accept if block_given? @@ -268,7 +268,7 @@ class TestSocketNonblock < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_nonblock.rb#L268 def test_connect_nonblock_error serv = TCPServer.new("127.0.0.1", 0) - af, port, host, addr = serv.addr + _, port, _, _ = serv.addr c = Socket.new(:INET, :STREAM) begin c.connect_nonblock(Socket.sockaddr_in(port, "127.0.0.1")) @@ -284,7 +284,6 @@ class TestSocketNonblock < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_nonblock.rb#L284 serv = Socket.new(:INET, :STREAM) serv.bind(Socket.sockaddr_in(0, "127.0.0.1")) serv.listen(5) - port = serv.local_address.ip_port begin s, _ = serv.accept_nonblock rescue Errno::EWOULDBLOCK Index: ruby_2_1/test/socket/test_addrinfo.rb =================================================================== --- ruby_2_1/test/socket/test_addrinfo.rb (revision 46911) +++ ruby_2_1/test/socket/test_addrinfo.rb (revision 46912) @@ -140,7 +140,7 @@ class TestSocketAddrinfo < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_addrinfo.rb#L140 ai = Addrinfo.new(s1.getsockname) s2 = Socket.new(:INET, :STREAM, 0) s2.connect(ai) - s3, sender_addr = s1.accept + s3, _ = s1.accept s2.send("test-socket-connect", 0) assert_equal("test-socket-connect", s3.recv(100)) ensure @@ -166,7 +166,7 @@ class TestSocketAddrinfo < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_addrinfo.rb#L166 rescue Errno::EISCONN end end - s3, sender_addr = s1.accept + s3, _ = s1.accept s2.send("test-socket-connect-nonblock", 0) assert_equal("test-socket-connect-nonblock", s3.recv(100)) ensure Index: ruby_2_1/test/socket/test_socket.rb =================================================================== --- ruby_2_1/test/socket/test_socket.rb (revision 46911) +++ ruby_2_1/test/socket/test_socket.rb (revision 46912) @@ -359,7 +359,6 @@ class TestSocket < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_socket.rb#L359 # Mac OS X may sets IFDISABLED as FreeBSD does ulSIOCGIFFLAGS = 3223349521 ulSIOCGIFINFO_IN6 = 3224398156 - ulSIOCGIFAFLAG_IN6 = 3240126793 ulIFF_POINTOPOINT = 0x10 ulND6_IFF_IFDISABLED = 8 in6_ondireq = ifr_name @@ -403,7 +402,7 @@ class TestSocket < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_socket.rb#L402 raise "no response from #{ai.inspect} #{nd6options}ping=#{ping_p}" end msg2, addr = s.recvmsg - msg2, remote_address, local_address = Marshal.load(msg2) + msg2, _, _ = Marshal.load(msg2) assert_equal(msg1, msg2) assert_equal(ai.ip_address, addr.ip_address) } @@ -454,7 +453,7 @@ class TestSocket < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_socket.rb#L453 Addrinfo.udp("127.0.0.1", 0).bind {|s2| s1.setsockopt(:SOCKET, :TIMESTAMP, true) s2.send "a", 0, s1.local_address - msg, addr, rflags, stamp = s1.recvmsg + msg, _, _, stamp = s1.recvmsg assert_equal("a", msg) assert(stamp.cmsg_is?(:SOCKET, :TIMESTAMP)) } @@ -481,7 +480,7 @@ class TestSocket < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_socket.rb#L480 return end s2.send "a", 0, s1.local_address - msg, addr, rflags, stamp = s1.recvmsg + msg, _, _, stamp = s1.recvmsg assert_equal("a", msg) assert(stamp.cmsg_is?(:SOCKET, :TIMESTAMPNS)) } @@ -503,7 +502,7 @@ class TestSocket < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/socket/test_socket.rb#L502 Addrinfo.udp("127.0.0.1", 0).bind {|s2| s1.setsockopt(:SOCKET, :BINTIME, true) s2.send "a", 0, s1.local_address - msg, addr, rflags, stamp = s1.recvmsg + msg, _, _, stamp = s1.recvmsg assert_equal("a", msg) assert(stamp.cmsg_is?(:SOCKET, :BINTIME)) } Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r45034,45037 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/