Skip to content

Instantly share code, notes, and snippets.

@spmallette
Last active October 13, 2020 12:30
Show Gist options
  • Save spmallette/bce97bbcb74811ca25d7c57245ed502c to your computer and use it in GitHub Desktop.
Save spmallette/bce97bbcb74811ca25d7c57245ed502c to your computer and use it in GitHub Desktop.
$ git diff --ignore-all-space
diff --git a/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy b/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy
index 52302f3c30..bb0bd1d826 100644
--- a/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy
+++ b/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy
@@ -96,7 +96,9 @@ class Interpreter implements Evaluator
}
finally {
// Remove the script class generated
+ if (type?.name) {
classLoader.removeClassCacheEntry(type?.name)
+ }
// Remove the inline closures from the cache as well
classLoader.removeClassCacheEntry('$_run_closure')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment