From: Sam Stephenson Date: 2004-08-15T04:40:41+09:00 Subject: Re: creating classes on the fly On Sun, 15 Aug 2004 04:31:11 +0900, Claus Spitzer wrote: > I'm stuck on the ??? part. I tried > > class eval( str1 ) > > I tried > > class str.intern # (I think I know by now why this one was a stupid idea) > > I tried > > $myclassref = eval str1 > class $myclassref > > All to no avail. So I'm wondering whether I'm trying to do this the > wrong way. What would be the Ruby way of solving this problem? > | klass = eval(str1) | klass.class_eval do | include Mod | end Sam