aboutsummaryrefslogtreecommitdiffstats
path: root/test/socket/test_tcp.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-14 10:03:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-14 10:03:43 +0000
commit8c84803d805ddcf0e2b62e98ffa7f6e6ecc56ae6 (patch)
treed36a7df343b59eee17a9980f067013e25661ff26 /test/socket/test_tcp.rb
parentcb52dda1469a81d9be2538b727137358f41b60f7 (diff)
downloadruby-8c84803d805ddcf0e2b62e98ffa7f6e6ecc56ae6.tar.gz
IPSocket#inspect
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket/test_tcp.rb')
-rw-r--r--test/socket/test_tcp.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb
index 450d1b35b5..11325fdedb 100644
--- a/test/socket/test_tcp.rb
+++ b/test/socket/test_tcp.rb
@@ -8,6 +8,15 @@ end
class TestSocket_TCPSocket < Test::Unit::TestCase
+ def test_inspect
+ TCPServer.open("localhost", 0) {|server|
+ assert_match(/AF_INET/, server.inspect)
+ TCPSocket.open("localhost", server.addr[1]) {|client|
+ assert_match(/AF_INET/, client.inspect)
+ }
+ }
+ end
+
def test_initialize_failure
# These addresses are chosen from TEST-NET-1, TEST-NET-2, and TEST-NET-3.
# [RFC 5737]