aboutsummaryrefslogtreecommitdiffstats
path: root/test/socket/test_udp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/socket/test_udp.rb')
-rw-r--r--test/socket/test_udp.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/socket/test_udp.rb b/test/socket/test_udp.rb
index 5b23cce288..bec2181918 100644
--- a/test/socket/test_udp.rb
+++ b/test/socket/test_udp.rb
@@ -15,6 +15,17 @@ class TestSocket_UDPSocket < Test::Unit::TestCase
assert_nothing_raised { UDPSocket.open(:AF_INET) {} }
end
+ def test_inspect
+ UDPSocket.open() {|sock|
+ assert_match(/AF_INET\b/, sock.inspect)
+ }
+ if Socket.const_defined?(:AF_INET6)
+ UDPSocket.open(Socket::AF_INET6) {|sock|
+ assert_match(/AF_INET6\b/, sock.inspect)
+ }
+ end
+ end
+
def test_connect
s = UDPSocket.new
host = Object.new