From fb933bf70bb4f3637d11b630056738b4cf8c52fd Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 25 Dec 2014 01:23:57 +0000 Subject: [PATCH] test_dns.rb: fix scope * test/resolv/test_dns.rb (test_query_ipv4_address): fix local variables scope. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/resolv/test_dns.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb index da7fa43dbc..8334622410 100644 --- a/test/resolv/test_dns.rb +++ b/test/resolv/test_dns.rb @@ -53,9 +53,7 @@ class TestResolvDNS < Test::Unit::TestCase } } 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