summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-11 22:56:13 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-11 22:56:13 +0000
commit615e7987ca619a9d8df01844b61d95796b95fd19 (patch)
tree75467706dc185b58087aafb9f029e5c2e9a31ba8 /ext/socket
parent83d7aca7f6c02a92d49be1490e72b50fe9643598 (diff)
* object.c (rb_obj_equal): Add documentation. Patch by Vincent Batts.
[Ruby 1.9 - Bug #4664] * lib/rexml: ditto * lib/mkmf.rb: ditto * ext/socket/lib/socket.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/lib/socket.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/socket/lib/socket.rb b/ext/socket/lib/socket.rb
index d7bd760..8898b51 100644
--- a/ext/socket/lib/socket.rb
+++ b/ext/socket/lib/socket.rb
@@ -29,7 +29,13 @@ class Addrinfo
end
end
- def connect_internal(local_addrinfo)
+ # creates a new Socket connected to the address of +local_addrinfo+.
+ #
+ # If no arguments are given, the address of the socket is not bound.
+ #
+ # If a block is given the created socket is yielded for each address.
+ #
+ def connect_internal(local_addrinfo) # :yields: socket
sock = Socket.new(self.pfamily, self.socktype, self.protocol)
begin
sock.ipv6only! if self.ipv6?