From: Dave Thomas Date: 2004-02-20T13:07:13+09:00 Subject: Re: Change to #new (was OpenStruct#initialize to yield self) On Feb 19, 2004, at 21:33, nobu.nokada@softhome.net wrote: >> As more general suggestion. Could 'new' yield the new object is a >> block >> is given? This behavior could then be overridden by the classes where >> this isn't appropriate (such as hash). > > It's an old fashion. > I know that in the case of File.new it is deprecated. File could be one of the exceptions. But in general it seems like a fairly good idea, particularly for transient objects. It might even help with garbage collection. Cheers Dave