From: Sean Ross Date: 2003-12-25T04:21:53+09:00 Subject: Re: Is there a way to use "def self.new" to do the job of "def initialize"? "Jamis Buck" wrote in message news:3FE9DDF4.5070009@email.byu.edu... > However, with eval magic, you can do it: > > def C.new( a ) > obj = allocate > obj.instance_eval { @a = a } > obj > end > > It just feels kind of klunky to me (and an invasion of C's privacy) to > use instance_eval like that... Hi. Thank you. I agree it does feel "klunky". But it can be done. Very cool. I won't use it, I just wanted to know whether it could be done. Thanks for satisfying my curiousity, Sean