Skip to content

Commit 31d6240

Browse files
committed
Remove warning by asserting its presence
$ rake test >/dev/null /tmp/test/test_ipaddr.rb:202: warning: IPAddr#ipv4_compat is obsolete
1 parent 7c85bb8 commit 31d6240

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_ipaddr.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ def test_ipv4_compat
199199
assert_equal(128, b.prefix)
200200

201201
a = IPAddr.new("192.168.0.0/16")
202-
b = a.ipv4_compat
202+
assert_warning(/obsolete/) {
203+
b = a.ipv4_compat
204+
}
203205
assert_equal("::192.168.0.0", b.to_s)
204206
assert_equal(Socket::AF_INET6, b.family)
205207
assert_equal(112, b.prefix)

0 commit comments

Comments
 (0)