aboutsummaryrefslogtreecommitdiffstats
path: root/test/rinda
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-31 18:21:00 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-31 18:21:00 +0000
commit984a34bc3ff7cfc77d06b3d0219171d49b0bff7e (patch)
tree4ff70011abf7e38890f2bb2f7d1421c3b084ed88 /test/rinda
parenta78e45b5fe018f98e03e4bbf8e036822349980cb (diff)
downloadruby-984a34bc3ff7cfc77d06b3d0219171d49b0bff7e.tar.gz
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
Diffstat (limited to 'test/rinda')
-rw-r--r--test/rinda/test_rinda.rb6
1 files changed, 3 insertions, 3 deletions
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