I'm just double checking before I fix it, but this page is woefully out of date, isn't it?
http://groovy.codehaus.org/Per-Instance+MetaClass From what I understand, all instances now have their own metaClass without any special handling.
This code, for instance, throws a MissingMethodException on the call to b.foo().
def a = new Object()
a.metaClass.foo = { -> println "Bar" }
def b = new Object()
b.foo()
Is there any particular gotchas around Per-Instance MetaClasses I should include on that page?
--
~~ Robert Fischer, Smokejumper IT Consulting.
Enfranchised Mind Blog
http://EnfranchisedMind.com/blogGrails Expert Retainer Services
http://smokejumperit.com/grails-retainer/---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email