[#3741] Re: Why it's quiet -- standard distribution issues — Aleksi Niemel<aleksi.niemela@...>
I think it's the feature of the mailing list archive to create a threads of
[#3756] RE: XMP on comments — Aleksi Niemel<aleksi.niemela@...>
> require "xmp"
[#3766] modulo and remainder — Dave Thomas <Dave@...>
[#3776] Kernel.rand — Aleksi Niemel<aleksi.niemela@...>
How about defining:
[#3781] Widening out discussions — Dave Thomas <Dave@...>
[#3795] Re: Array.uniq! returning nil — Aleksi Niemel<aleksi.niemela@...>
> As matz said in [ruby-talk:3785] and Dave said in [ruby-talk:1229],
Hi, Aleksi,
[#3823] Re: Array.pick — Aleksi Niemel<aleksi.niemela@...>
> > Just a general comment--a brief statement of purpose and using
[#3827] JRuby? — Aleksi Niemel<aleksi.niemela@...>
Is there or will there be Ruby equivalent of JPython?
[#3882] Re: Array.uniq! returning nil — Aleksi Niemel<aleksi.niemela@...>
> |look too strange, confusing, or cryptic. Maybe just @, $, %, &.
Hi,
[#3918] A question about variable names... — Dave Thomas <Dave@...>
[#3935] If your company uses Pallets, Skids, Boxes, Lumber, etc. — pallets2@...
[#3956] Tk PhotoImage options — andy@... (Andrew Hunt)
Hi all,
[#3971] Thread and File do not work together — "Michael Neumann" <neumann@...>
following example do not work correctly with my ruby
[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>
> Principle of Least Effort.
Hi,
[#4005] Re: Pluggable functions and blocks — Aleksi Niemel<aleksi.niemela@...>
Aleksi makes a question:
[#4008] Ruby installation instructions for Windows — Aleksi Niemel<aleksi.niemela@...>
I had to write these instructions for my friends. I thought it might be nice
[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>
On 15 Jul 2000 22:08:50 -0500,
Hi,
[#4057] Re: What are you using Ruby for? — Aleksi Niemel<aleksi.niemela@...>
Johann:
[#4082] Re: What are you using Ruby for? — Aleksi Niemel<aleksi.niemela@...>
[#4091] 'each' and 'in' — hal9000@...
I just recently realized why the default
[#4107] Re: 'each' and 'in' -- special char problem? — schneik@...
[#4114] Method signature - a question for the group — Dave Thomas <Dave@...>
[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>
Hi,
[#4158] Getting Tk to work on Windows — "Michael Neumann" <neumann@...>
Hi....
[#4178] Partly converted English Ruby/Tk widget demo working. — Conrad Schneiker <schneik@...>
Hi,
[#4234] @ variables not updated within method? — Hugh Sasse Staff Elec Eng <hgs@...>
Hugh Sasse Staff Elec Eng <hgs@dmu.ac.uk> writes:
On 27 Jul 2000, Dave Thomas wrote:
[#4267] Ruby.next, Perl6, Python 3000, Tcl++, etc. -- Any opportunities for common implementation code? — "Conrad Schneiker" <schneiker@...>
Hi,
"Conrad Schneiker" wrote:
[ruby-talk:03757] Socket error reporting
ruby -rsocket -e 's = TCPsocket.open("foobar.com", 80)'
printed:
-e:1:in `open': Unknown error (SocketError)
from -e:1
and prints this:
/tmp/rbLKONga:1:in `open': getaddrinfo: Unknown error (SocketError)
from /tmp/rbLKONga:1
after this patch (why '-e:1' changed to '/tmp/trash'? Was it because
first message is coming from 1.5.3 (old) and my patch is
against 1.4.5, so the 1.5 brach has better support for -e?)
########################
--- socket.c Mon Jun 26 10:03:16 2000
+++ socket_hacked.c Mon Jul 3 03:33:21 2000
@@ -518,7 +518,7 @@
error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0,
NI_NUMERICHOST);
if (error) {
- rb_raise(rb_eSocket, "%s", gai_strerror(error));
+ rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(error));
}
}
@@ -604,7 +604,7 @@
if (hostp && hostp[strlen(hostp)-1] == '\n') {
rb_raise(rb_eSocket, "newline at the end of hostname");
}
- rb_raise(rb_eSocket, "%s", gai_strerror(error));
+ rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
}
return res;
@@ -648,14 +648,14 @@
error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
NULL, 0, 0);
if (error) {
- rb_raise(rb_eSocket, "%s", gai_strerror(error));
+ rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(error));
}
addr1 = rb_tainted_str_new2(hbuf);
}
error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
pbuf, sizeof(pbuf), NI_NUMERICHOST |
NI_NUMERICSERV);
if (error) {
- rb_raise(rb_eSocket, "%s", gai_strerror(error));
+ rb_raise(rb_eSocket, "getnameinfo %s", gai_strerror(error));
}
addr2 = rb_tainted_str_new2(hbuf);
if (do_not_reverse_lookup) {
@@ -795,7 +795,7 @@
}
error = getaddrinfo(host, portp, &hints, &res0);
if (error) {
- rb_raise(rb_eSocket, "%s", gai_strerror(error));
+ rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
}
fd = -1;
@@ -1842,7 +1842,7 @@
}
error = getaddrinfo(hptr, pptr, &hints, &res);
if (error) {
- rb_raise(rb_eSocket, "%s", gai_strerror(error));
+ rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
}
ret = mkaddrinfo(res);
@@ -1948,7 +1948,7 @@
}
#endif
error = getaddrinfo(hptr, pptr, &hints, &res);
- if (error) goto error_exit;
+ if (error) goto error_exit_addr;
sap = res->ai_addr;
}
else {
@@ -1957,7 +1957,7 @@
error = getnameinfo(sap, SA_LEN(sap), hbuf, sizeof(hbuf),
pbuf, sizeof(pbuf), fl);
- if (error) goto error_exit;
+ if (error) goto error_exit_name;
if (res) {
for (r = res->ai_next; r; r = r->ai_next) {
char hbuf2[1024], pbuf2[1024];
@@ -1965,7 +1965,7 @@
sap = r->ai_addr;
error = getnameinfo(sap, SA_LEN(sap), hbuf2, sizeof(hbuf2),
pbuf2, sizeof(pbuf2), fl);
- if (error) goto error_exit;
+ if (error) goto error_exit_name;
if (strcmp(hbuf, hbuf2) != 0|| strcmp(pbuf, pbuf2) != 0) {
freeaddrinfo(res);
rb_raise(rb_eSocket, "sockaddr resolved to multiple
nodename");
@@ -1975,9 +1975,13 @@
}
return rb_assoc_new(rb_tainted_str_new2(hbuf),
rb_tainted_str_new2(pbuf));
- error_exit:
+ error_exit_addr:
if (res) freeaddrinfo(res);
- rb_raise(rb_eSocket, "%s", gai_strerror(error));
+ rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
+
+ error_exit_name:
+ if (res) freeaddrinfo(res);
+ rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(error));
}
static VALUE mConst;