From 98611eb1d2e0b2ae186c0234b479c1d85f0a0ec5 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 30 May 2016 11:23:32 +0000 Subject: test_addrinfo.rb: signle digit address * test/socket/test_addrinfo.rb (test_addrinfo_ip): use single digit address so that the values are same in both decimal and octal. some platform zero-prefixed dotted-decimal is parsed as an octal value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/socket/test_addrinfo.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/socket/test_addrinfo.rb b/test/socket/test_addrinfo.rb index 9084a604ed..401bd6e174 100644 --- a/test/socket/test_addrinfo.rb +++ b/test/socket/test_addrinfo.rb @@ -37,9 +37,9 @@ class TestSocketAddrinfo < Test::Unit::TestCase assert_equal([0, "255.255.255.255"], Socket.unpack_sockaddr_in(ai)) ai = assert_nothing_raised(SocketError) do - Addrinfo.ip("00000000127.000000000.00000000.0000001x".chop) + Addrinfo.ip("00000000001.000000000.00000000.0000001x".chop) end - assert_equal([0, "127.0.0.1"], Socket.unpack_sockaddr_in(ai)) + assert_equal([0, "1.0.0.1"], Socket.unpack_sockaddr_in(ai)) end def test_addrinfo_tcp -- cgit v1.2.3