summaryrefslogtreecommitdiff
path: root/test/socket/test_socket.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 17:40:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 17:40:41 +0000
commitaa0ae0d3b6ab8d6c3143960bd0b3d154bd96d10e (patch)
tree41d1dfee546a4713ea618d0821614848dfe26fa2 /test/socket/test_socket.rb
parentff7e0f7f614ed1db3e3464db290192aebac1c096 (diff)
* ext/socket/socket.c (optname_arg): defined.
(bsock_setsockopt): use optname_arg. (bsock_getsockopt): ditto. * ext/socket/mkconstants.rb: generate so_optname_to_int, ip_optname_to_int, ipv6_optname_to_int, tcp_optname_to_int and udp_optname_to_int. more constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket/test_socket.rb')
-rw-r--r--test/socket/test_socket.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index af241c0236a..4733d12c2a9 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -16,9 +16,9 @@ class TestBasicSocket < Test::Unit::TestCase
inet_stream do |s|
n = s.getsockopt(Socket::SOL_SOCKET, Socket::SO_TYPE)
assert_equal([Socket::SOCK_STREAM].pack("i"), n)
- n = s.getsockopt("SOL_SOCKET", Socket::SO_TYPE)
+ n = s.getsockopt("SOL_SOCKET", "SO_TYPE")
assert_equal([Socket::SOCK_STREAM].pack("i"), n)
- n = s.getsockopt(:SOL_SOCKET, Socket::SO_TYPE)
+ n = s.getsockopt(:SOL_SOCKET, :SO_TYPE)
assert_equal([Socket::SOCK_STREAM].pack("i"), n)
n = s.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
assert_equal([0].pack("i"), n)