>>>>> "C" == Clemens Wyss <wys / helbling.ch> writes:

 Try

C> context = Context.new
C> eval(
C> "print ('hello')
C> class A
C>   def initialize
C>      ObjectSpace.define_finalizer(self, proc{|id|
C>        print \"\nfinal #{id}\"})
C>   end

     def toto
         print ('toto')
     end

C> end
C> a = A.new", context.context)

   a = A.new.toto", context.context)


Guy Decoux