-
-
Save anonymous/54f51b1241cd85feac19 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
diff --git a/core/src/main/java/org/jruby/Main.java b/core/src/main/java/org/jruby/Main.java | |
index 3d21b55..fb0f7af 100644 | |
--- a/core/src/main/java/org/jruby/Main.java | |
+++ b/core/src/main/java/org/jruby/Main.java | |
@@ -300,8 +300,11 @@ public class Main { | |
return doRunFromMain(runtime, in, filename); | |
} | |
} finally { | |
- if (didTeardown.compareAndSet(false, true)) { | |
- runtime.tearDown(); | |
+ if (config.isHardExit()) { | |
+ // we're the command-line JRuby, and should shut down at exit | |
+ if (didTeardown.compareAndSet(false, true)) { | |
+ runtime.tearDown(); | |
+ } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment