summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-30 11:23:32 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-30 11:23:32 (GMT)
commit632097082b588304a866707a9f7d7330a16329cc (patch)
tree4f6a6658fb7c745a6e87368f470b08956a32b0e3 /test
parent85950c52570e9d79e9108918db5d37abd9e16a32 (diff)
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')
-rw-r--r--test/socket/test_addrinfo.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/socket/test_addrinfo.rb b/test/socket/test_addrinfo.rb
index 9084a60..401bd6e 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