Created
March 27, 2011 03:22
-
-
Save irof/888880 to your computer and use it in GitHub Desktop.
差し替えた後元に戻す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hello {void hello(){println "1"}} | |
def a = new Hello() | |
a.hello() | |
a.metaClass.hello = { println "2" } | |
a.hello() | |
a.metaClass.hello = { a.&hello() } | |
a.hello() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | |
2 | |
1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment