On 10/4/07, hlovatt <[EMAIL PROTECTED]> wrote: > > I haven't tried this, so I cannot speak from experiance - this is just > a thought. > > To enable class redefinitions why not run the JVM that is running > JRuby in debugging mode and hot swap the class. See:
AFAIK, it's VM-dependent how far it's supported. In the Sun VM, you can swap a class if the method body is changed, but if method signatures are changed, or fields are added or removed, the change is rejected. I believe some version of the IBM VM allows for more flexibility; I don't know where the others stack up. It's one feature people have asked for more flexibility on, but apparently it's a tough one to implement correctly. There was at least one research project at Sun, or sponsored by Sun, a few years back on the topic. As I understood it, the general problem is what you do with other class instances that have references to the class you're swapping, in case the swap puts them in some new, possibly inconsistent state as far as those references are concerned. A more complete "class hotswapping" feature for "dynamic" languages has been suggested in the dynamic-language-support JSR, but I haven't heard yet whether they will commit to it. Patrick --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
