Mark Hubbart
4/29/2005 7:50:00 PM
On 4/29/05, James Edward Gray II <james@grayproductions.net> wrote:
> On Apr 29, 2005, at 1:24 PM, Joe Van Dyk wrote:
>
> > Don't you mean Module.const_get()?
>
> Yes, my bad. Module.const_get() called on Object, is what I meant.
actually, Module#const_get, or Object.const_get, IMHO :)
Also, the OP might look at #allocate. #allocate never needs arguments,
#new might fail without arguments. Of course, allocate doesn't
initialize...
klass = "Array"
Object.const_get(klass).allocate #==> []
cheers,
Mark