Created
June 15, 2021 17:06
-
-
Save jeffscottbrown/e12cb0ccac705560ef344c6e0b31b59c 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
| ~ $ java -version | |
| openjdk version "1.8.0_202" | |
| OpenJDK Runtime Environment (Zulu 8.36.0.1-CA-macosx) (build 1.8.0_202-b05) | |
| OpenJDK 64-Bit Server VM (Zulu 8.36.0.1-CA-macosx) (build 25.202-b05, mixed mode) | |
| ~ $ | |
| ~ $ groovy -version | |
| Groovy Version: 2.5.14 JVM: 1.8.0_202 Vendor: Azul Systems, Inc. OS: Mac OS X | |
| ~ $ | |
| ~ $ cat doit.groovy | |
| sb = new StringBuffer('demo') | |
| sb.metaClass.toString = { -> 'upated' } | |
| println sb.toString() | |
| ~ $ | |
| ~ $ groovy doit | |
| demo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment