private Status doRunFromMain(Ruby runtime, InputStream in, String filename) { long now = -1; try { if (config.isBenchmarking()) { now = System.currentTimeMillis(); } if (config.isSamplingEnabled()) { SimpleSampler.startSampleThread(); } doCheckSecurityManager(); try { runtime.runFromMain(in, filename); } finally { if (config.isBenchmarking()) { config.getOutput().println("Runtime: " + (System.currentTimeMillis() - now) + " ms"); } if (config.isSamplingEnabled()) { org.jruby.util.SimpleSampler.report(); } } } catch (RaiseException rj) { return new Status(handleRaiseException(rj)); } return new Status(); }
private Status doRunFromMain(Ruby runtime, InputStream in, String filename) { long now = -1; try { doCheckSecurityManager(); runtime.runFromMain(in, filename); runtime.getTruffleBridge().shutdown(); } catch (RaiseException rj) { return new Status(handleRaiseException(rj)); } return new Status(); }