Skip to content

Instantly share code, notes, and snippets.

/-

Created January 12, 2015 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/50f2ad79f5f0703d870d to your computer and use it in GitHub Desktop.
Save anonymous/50f2ad79f5f0703d870d to your computer and use it in GitHub Desktop.
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