[#2367] Standard libraries — Dave Thomas <dave@...>

From ruby-dev summary:

60 messages 2004/02/11

[#2397] PATCH: deprecate cgi-lib, getopts, importenv, parsearg from standard library — Gavin Sinclair <gsinclair@...>

Index: cgi-lib.rb

15 messages 2004/02/12

[#2465] PATCH: OpenStruct#initialize to yield self — Gavin Sinclair <gsinclair@...>

This is a common approach I use to object initialization; I don't know

24 messages 2004/02/19

Re: [PATCH] Use the BasicSocket#do_not_reverse_lookup flag in Webrick

From: Thomas Uehlinger <uehli@...>
Date: 2004-02-09 07:33:05 UTC
List: ruby-core #2361
Hi,


On Mon, 9 Feb 2004 16:04:49 +0900
"Kawaji, Shinya" <kawaji@hoppeta.com> wrote:
 
> I also submitted this pacth.
> 
> (Sorry but in Japanese.)
> http://www.notwork.org/ipr/webrick/webrickja/100/105.html
> 
> 

So I'm not the only one... ;-)


> However, I think that applying is difficult for it since this method
> (BasicSocket.do_not_reverse_lookup) influences the whole webrick server.
> http://www.rubycentral.com/book/lib_network.html#BasicSocket.do_not_reverse_lookup
>

That's not true anymore (from Ruby 1.9 changelog):

Fri Feb  6 10:12:06 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/socket.c (bsock_do_not_reverse_lookup): control reverse
	  lookup for every instance.  [ruby-core:02346]

So now you can do:

sock = IPSocket.new(...)

sock.do_not_reverse_lookup= true / false 

So maybe you can change your patch too and then they will accept this patch.

-- Thomas Uehlinger
 

> I think that it is necessary whether IPSocket#peeraddr can receive
> "do not reverse lookup flag" or not.
> 
> for example,
> 
>   IPSocket#peeraddr()
>     reverse lookup owing to BasicSocket.do_not_reverse_lookup.
> 
>   IPSocket#peeraddr(false)
>     reverse lookup always.
> 
>   IPSocket#peeraddr(true)
>     DO NOT reverse lookup always.
> 
> 
> Or it should stop using IPSocket#peeraddr and ruby's Resolv library
> should be used for reverse lookup.
> 
> --
> Shinya Kawaji
> 
> 

In This Thread