From: Ilan Berci Date: 2008-02-29T08:52:46+09:00 Subject: Re: String to Class? Stefano Crocco wrote: > > foo.split('::').inject(Kernel){|res, i| res.const_get(i)} > > Stefano Gordon, Stefano, That is a SUPER cool form of inject()! I usually just use is as a builder for a hash or other container type, but having inject using something fairly different on each iteration is grand! Why didn't I think of that???!!! Great tip, thanks again ilan -- Posted via http://www.ruby-forum.com/.