hi:

I don't think you can reassign self in the middle of an instance, but
I'm not an expert on metaprogramming.

However, I'm not sure how useful it is to change classes midstream.  For
expample you can simply do this:

begClass = a.class
endClass = a.changeToSomethingElse(42)
endClass = a.class

Just have changeToSomethingElse(42) return an instance of a different
class.  Likewise, just have "push()" return a new class type.

If you're more spesific about what you're trying to do, it would help me
understand.

Eric

-- 
Posted via http://www.ruby-forum.com/.