aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-30 11:23:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-30 11:23:32 +0000
commit98611eb1d2e0b2ae186c0234b479c1d85f0a0ec5 (patch)
tree4f6a6658fb7c745a6e87368f470b08956a32b0e3
parentae0d19955a3f1ca52d4637bc0a6c9e3b3578b3ab (diff)
downloadruby-98611eb1d2e0b2ae186c0234b479c1d85f0a0ec5.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
-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 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