Created
June 15, 2021 15:53
-
-
Save jeffscottbrown/50c3498ab5e4609ba5dadb1537a25f29 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| groovy:000> sb = new StringBuffer('demo') | |
| ===> demo | |
| groovy:000> | |
| groovy:000> sb.metaClass.toString = { -> 'updated' } | |
| ===> groovysh_evaluate$_run_closure1@5c8504fd | |
| groovy:000> sb | |
| ===> demo | |
| groovy:000> sb.toString() | |
| ===> demo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment