Skip to content

@headius /gist:2639787
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
diff --git a/src/org/jruby/Ruby.java b/src/org/jruby/Ruby.java
index 35def50..84ef7f3 100644
--- a/src/org/jruby/Ruby.java
+++ b/src/org/jruby/Ruby.java
@@ -2883,6 +2883,14 @@ public final class Ruby {
public void tearDown(boolean systemExit) {
int status = 0;
+ // clear out threadlocals so they don't leak
+ recursive = new ThreadLocal<Map<String, RubyHash>>();
+ recursiveKey = new ThreadLocal<RubySymbol>() {
+ protected RubySymbol initialValue() {
+ return newSymbol("__recursive_key__");
+ }
+ };
+
while (!atExitBlocks.empty()) {
RubyProc proc = atExitBlocks.pop();
try {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.