Christian Surlykke <christian / surlykke.dk> wrote: > > Object.const_get can convert a String to a constant, so if you do: > > Object.const_get(h[:class].to_s).new(h) > > it should work, no matter if the hash comes from source or yaml the idea was excellent but it seems it doens't work if the class I need is defined in another class namespace, e.g. irb(main):117:0> Object.const_get('CGI::Cookie') NameError: wrong constant name CGI::Cookie anyway thanks for the help -- Deh! Impiacciami, imploroti sgabazzone rampante!