diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-30 11:23:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-30 11:23:32 +0000 |
commit | 632097082b588304a866707a9f7d7330a16329cc (patch) | |
tree | 4f6a6658fb7c745a6e87368f470b08956a32b0e3 /test/socket/test_addrinfo.rb | |
parent | 85950c52570e9d79e9108918db5d37abd9e16a32 (diff) | |
download | ruby-632097082b588304a866707a9f7d7330a16329cc.tar.gz |
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
Diffstat (limited to 'test/socket/test_addrinfo.rb')
-rw-r--r-- | test/socket/test_addrinfo.rb | 4 |
1 files 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 |