On Dec 3, 2010, at 10:39 AM, David E. wrote:

> Yeah maybe the string confused things. I don't want to even convert to=20=

> string.
>=20
> The value in string is the "human name" of the class i want to convert=20=

> it to.
>=20
> So i'm converting a string into an object of class type of the string=20=

> value.
>=20
> So convert "Dave" into an object of type Dave()
>=20
> --=20
> Posted via http://www.ruby-forum.com/.
>=20


Use Ruby's reflectivity:

    obj =3D const_get(string).new

assuming #string has a value that's the exact name of the const you're =
trying to find.

Jason