From: Jimmy Thrasher Date: 2001-08-25T21:15:19+09:00 Subject: [ruby-talk:20366] Freezing state in the Ruby interpreter (RCR?) Unlike Java and Smalltalk, Ruby doesn't have any file/class bindings. So when one wants to, say, reload the contents of a class, checking for update, one can't guarantee that simply loading the file that the class was first found in would guarantee reloading of all the functionality that the class held, since other files could have given it more functionality. So, what I think would be Really Cool is the ability to freeze the state of the interpreter at a given point and be able to restore to that point. That is, if at one point in the code I say: freezeState("statelabel") and at another point in the code I were to say: restoreState("statelabel") the entire interpreter would go back to the state where it was at the original freezeState. This would include all modules loaded, where the instruction pointer is, etc. On one hand, this seems like an idea limited in use, but I think it would help out in a lot of things, since Ruby is so flexible and flows like a script as opposed to something like Java, where extra-method ordering of statements doesn't really matter. Now, this could be implemented in terms of Ruby Behaviors, but I don't know enough about the behaviors to tell if they're that generic. Any ideas? Jimmy