>>>>> "P" == Paul Argentoff <argentoff / rtelekom.ru> writes:

P> Can i use an arbitrary string (i.e. read from the config file) as a class'
P> name to call it's new(), etc. knowing that i have that class' definition?

 a class name begin with a capital letter, this mean that it's a
 constant. Retrieve the constant (with const_get) and you have the
 class. For example

pigeon% ruby -e 'p Object.const_get("Array").new'
[]
pigeon% 

pigeon% ruby -e 'p File.const_get("Stat").new("b.rb")'
#<File::Stat dev=0x301, ino=688436, mode=0100755, nlink=1, uid=1000,
gid=1000, rdev=0x0, size=75, blksize=4096, blocks=2, atime=Mon Mar 24
12:57:10 CET 2003, mtime=Mon Mar 24 12:55:42 CET 2003, ctime=Mon Mar 24
12:55:42 CET 2003> 
pigeon% 


Guy Decoux