ruby-changes:36902
From: nobu <ko1@a...>
Date: Thu, 25 Dec 2014 10:24:02 +0900 (JST)
Subject: [ruby-changes:36902] nobu:r48983 (trunk): test_dns.rb: fix scope
nobu 2014-12-25 10:23:57 +0900 (Thu, 25 Dec 2014) New Revision: 48983 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48983 Log: test_dns.rb: fix scope * test/resolv/test_dns.rb (test_query_ipv4_address): fix local variables scope. Modified files: trunk/test/resolv/test_dns.rb Index: test/resolv/test_dns.rb =================================================================== --- test/resolv/test_dns.rb (revision 48982) +++ test/resolv/test_dns.rb (revision 48983) @@ -53,9 +53,7 @@ class TestResolvDNS < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/resolv/test_dns.rb#L53 } } server_thread = Thread.new { - timeout(5) do - msg, (_, client_port, _, client_address) = u.recvfrom(4096) - end + msg, (_, client_port, _, client_address) = timeout(5) {u.recvfrom(4096)} id, word2, qdcount, ancount, nscount, arcount = msg.unpack("nnnnnn") qr = (word2 & 0x8000) >> 15 opcode = (word2 & 0x7800) >> 11 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/