[#8815] Segfault in libc strlen, via rb_str_new2 — "Sean E. Russell" <ser@...>

Howdy,

12 messages 2006/09/09
[#8817] Re: Segfault in libc strlen, via rb_str_new2 — Eric Hodel <drbrain@...7.net> 2006/09/09

On Sep 8, 2006, at 10:10 PM, Sean E. Russell wrote:

Re: RDoc patch, possible bug in socket.c for TCPSocket.new

From: "Daniel Berger" <Daniel.Berger@...>
Date: 2006-09-26 21:17:00 UTC
List: ruby-core #8928
Daniel Berger wrote:
> Hi,
> 
> I just recently discovered that TCPSocket.new actually accepts up to four
> arguments.  Here's an attempt at an rdoc patch, but perhaps someone can 
> do a
> better job of explaining it:

<snip>

Here's the patch again, without the bad formatting from gmail, but with the 
corporate disclaimer:

--- socket.orig Tue Sep 26 12:58:49 2006
+++ socket.c    Tue Sep 26 13:06:44 2006
@@ -1274,6 +1274,14 @@
                      inetsock_cleanup, (VALUE)&arg);
  }

+/*
+ * call-seq:
+ *    TCPSocket.new(remote_host, remote_port, local_host=nil, local_port=nil)
+ *
+ * Opens a TCP connection to +remote_host+ on +remote_port+.  If +local_host+
+ * and +local_port+ are specified, then those parameters are used on the local
+ * end to establish the connection.
+ */
  static VALUE
  tcp_init(argc, argv, sock)
       int argc;

Regards,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.


In This Thread

Prev Next