-
-
Save anonymous/50f2ad79f5f0703d870d 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..8cb1ccf 100644 | |
--- a/core/src/main/java/org/jruby/Main.java | |
+++ b/core/src/main/java/org/jruby/Main.java | |
@@ -283,26 +283,20 @@ public class Main { | |
}); | |
} | |
- try { | |
- doSetContextClassLoader(runtime); | |
- | |
- if (in == null) { | |
- // no script to run, return success | |
- return new Status(); | |
- } else if (config.isXFlag() && !config.hasShebangLine()) { | |
- // no shebang was found and x option is set | |
- throw new MainExitException(1, "jruby: no Ruby script found in input (LoadError)"); | |
- } else if (config.getShouldCheckSyntax()) { | |
- // check syntax only and exit | |
- return doCheckSyntax(runtime, in, filename); | |
- } else { | |
- // proceed to run the script | |
- return doRunFromMain(runtime, in, filename); | |
- } | |
- } finally { | |
- if (didTeardown.compareAndSet(false, true)) { | |
- runtime.tearDown(); | |
- } | |
+ doSetContextClassLoader(runtime); | |
+ | |
+ if (in == null) { | |
+ // no script to run, return success | |
+ return new Status(); | |
+ } else if (config.isXFlag() && !config.hasShebangLine()) { | |
+ // no shebang was found and x option is set | |
+ throw new MainExitException(1, "jruby: no Ruby script found in input (LoadError)"); | |
+ } else if (config.getShouldCheckSyntax()) { | |
+ // check syntax only and exit | |
+ return doCheckSyntax(runtime, in, filename); | |
+ } else { | |
+ // proceed to run the script | |
+ return doRunFromMain(runtime, in, filename); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment