From: Brian Candler Date: 2003-03-10T01:16:04+09:00 Subject: Suggestion for setsockopt Extract from ruby-1.6.8: static VALUE bsock_setsockopt(sock, lev, optname, val) VALUE sock, lev, optname, val; { int level, option; OpenFile *fptr; int i; char *v; int vlen; rb_secure(2); level = NUM2INT(lev); <<<< I'd like to suggest that if 'lev' is provided as a string, then a getprotobyname() is done to convert it to an integer. Under Solaris and FreeBSD (at least), constants like 'SOL_TCP' are not defined, but you are supposed to lookup the protocol number in this way. If this has already been done in the development versions of Ruby, please excuse the noise :-) Regards, Brian.