From: Henning von Rosen Date: 2001-09-03T17:04:23+09:00 Subject: [ruby-talk:20747] how update anonymous classes? Hi! (1) What is the preferable way to add instance methods to anonymous classes/modules? (2) Are there ways to add instance methods to classes/modules without the clumsy(?) eval "class #{KLASS}; def ..." (I am implementing an experimantal system that will put the naming of the classes/modules into separate functionality, not part of ruby itself. So there will be no point in performing the normal "naming" of classes/modules. It would seem a bir clumsy to do the naming anyway, and add all functionality by eval, using some id-based naming scheme...) (3) Is then the sensible (non-eval) way of doing this to put all forseen functionality into prediefined modules and mix them in on-demand in the already instantiated objects? Hmm or can I mix-in instance-methods into classes without "eval"-ing? Thanks for any help/hints! amike via Henning