Details
-
Improvement
-
Status: Reopened
-
Minor
-
Resolution: Unresolved
-
1.7.2
-
None
-
None
Description
Spotted a question on stackoverflow about removing a metaclass method
The page here
http://groovy.codehaus.org/JN3525-MetaClasses
Says you should be able to do it by setting it to null, but we get this:
String.metaClass.foo = { "${delegate}foo" } assert 'kung'.foo() == 'kungfoo' String.metaClass.foo = null assert 'woo'.foo() == 'woofoo'
That last assert should fail (according to the docs), but it passes
Is this a documentation issue?
Attachments
Issue Links
- is duplicated by
-
GROOVY-5225 CLONE - Removing a metaClass method
- Closed