From: Martin DeMello Date: 2005-08-07T21:31:09+09:00 Subject: Re: Adding yet another Array.new form Nikolai Weibull wrote: > How about adding a fifth way of constructing new arrays?: > > Array.new{|array| block } > > Here, array is the newly created array, and the block will initialize it > as it sees fit, e.g, I'd rather add another 'new' wrapper, that calls new, calls initialze, and yields. Maybe call it 'create' or 'construct' or something. Object,construct(*args) {|obj| .... } The args would be passed to initialize, the block to construct. Would fail if the defauly initializer needed a block, but perhaps there's a way around that. martin