mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use custom methods for values whose type is different on platforms
Use Socket::Option#ip_multicast_loop and Socket::Option#ip_multicast_ttl instead of Socket::Option#int because NetBSD's size is byte though others' is int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a78e45b5fe
commit
984a34bc3f
1 changed files with 3 additions and 3 deletions
|
@ -657,8 +657,8 @@ class TestRingFinger < Test::Unit::TestCase
|
|||
def test_make_socket_ipv4_multicast
|
||||
v4mc = @rf.make_socket('239.0.0.1')
|
||||
|
||||
assert_equal(1, v4mc.getsockopt(:IPPROTO_IP, :IP_MULTICAST_LOOP).int)
|
||||
assert_equal(1, v4mc.getsockopt(:IPPROTO_IP, :IP_MULTICAST_TTL).int)
|
||||
assert_equal(1, v4mc.getsockopt(:IPPROTO_IP, :IP_MULTICAST_LOOP).ip_multicast_loop)
|
||||
assert_equal(1, v4mc.getsockopt(:IPPROTO_IP, :IP_MULTICAST_TTL).ip_multicast_ttl)
|
||||
end
|
||||
|
||||
def test_make_socket_ipv6_multicast
|
||||
|
@ -672,7 +672,7 @@ class TestRingFinger < Test::Unit::TestCase
|
|||
def test_make_socket_ipv4_multicast_hops
|
||||
@rf.multicast_hops = 2
|
||||
v4mc = @rf.make_socket('239.0.0.1')
|
||||
assert_equal(2, v4mc.getsockopt(:IPPROTO_IP, :IP_MULTICAST_TTL).int)
|
||||
assert_equal(2, v4mc.getsockopt(:IPPROTO_IP, :IP_MULTICAST_TTL).ip_multicast_ttl)
|
||||
end
|
||||
|
||||
def test_make_socket_ipv6_multicast_hops
|
||||
|
|
Loading…
Reference in a new issue