From: Gary Wright Date: 2010-12-04T05:07:52+09:00 Subject: Re: cast object to object On Dec 3, 2010, at 2:59 PM, David E. wrote: > > Robert, thanks. That is the concept. However, I am getting a weird error > > EXCEPTION:wrong constant name FireWatir::Link > > after inputting > > class_name = 'FireWatir::Link' > dave = Object.const_get(class_name).new > > Is my "class_name" formatted correctly? Object.const_get doesn't parse composite names like "FireWatir::Link". You would have to handle that in two steps: dave = Object.const_get('FireWatir').const_get('Link').new