diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-02 05:55:56 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-02 05:55:56 +0000 |
commit | 5ad05f37a5823530648f2bd42b4ec510a6e9046b (patch) | |
tree | c45b832ee1cab77383028a2e0810d2edc6d99607 /test | |
parent | 57d85f32f53b122012a63e1a2b93fdcdd7737cdc (diff) | |
download | ruby-5ad05f37a5823530648f2bd42b4ec510a6e9046b.tar.gz |
* ext/socket/socket.c (sock_initialize): make 3rd argument, protocol,
optional.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/socket/test_socket.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb index cd19fdebf9..a3ce2b7ba0 100644 --- a/test/socket/test_socket.rb +++ b/test/socket/test_socket.rb @@ -5,6 +5,11 @@ rescue LoadError end class TestSocket < Test::Unit::TestCase + def test_socket_new + s = Socket.new(:INET, :STREAM) + assert_kind_of(Socket, s) + end + def test_unpack_sockaddr sockaddr_in = Socket.sockaddr_in(80, "") assert_raise(ArgumentError) { Socket.unpack_sockaddr_un(sockaddr_in) } |