From 984a34bc3ff7cfc77d06b3d0219171d49b0bff7e Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 31 May 2013 18:21:00 +0000 Subject: 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 --- test/rinda/test_rinda.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/rinda') diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb index 1577af8405..5a3303ec92 100644 --- a/test/rinda/test_rinda.rb +++ b/test/rinda/test_rinda.rb @@ -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 -- cgit v1.2.3