/** * Get an instance of a JRuby runtime. Provide any loadpaths you want used at startup. * * @param loadPaths to specify where to look for Ruby modules. * @return an instance */ public static Ruby initialize(List loadPaths) { return initialize(loadPaths, new RubyInstanceConfig()); }
/** * Generate a class cache. This will end up setting max cache size per JRuby preferences * (e.g. jruby.jit.max). * * @param loader use the provided classloader to create the cache * @return */ public static ClassCache createClassCache(ClassLoader loader) { return new ClassCache(loader, new RubyInstanceConfig().getJitMax()); }
/** * Get an instance of a JRuby runtime. Provide any loadpaths you want used at startup. * * @param loadPaths to specify where to look for Ruby modules. * @return an instance */ public static Ruby initialize(List<String> loadPaths) { return initialize(loadPaths, new RubyInstanceConfig()); }
/** * Returns a new instance of the JRuby runtime configured with defaults. * * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */ public static Ruby newInstance() { return newInstance(new RubyInstanceConfig()); }
/** * Returns a new instance of the JRuby runtime configured with defaults. * * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */ public static Ruby newInstance() { return newInstance(new RubyInstanceConfig()); }
/** * Get an instance of a JRuby runtime. Provide any loadpaths you want used at startup. * * @param loadPaths to specify where to look for Ruby modules. * @return an instance */ public static Ruby initialize(List<String> loadPaths) { return initialize(loadPaths, new RubyInstanceConfig()); }
/** * Generate a class cache. This will end up setting max cache size per JRuby preferences * (e.g. jruby.jit.max). * * @param loader use the provided classloader to create the cache * @return */ public static ClassCache createClassCache(ClassLoader loader) { return new ClassCache(loader, new RubyInstanceConfig().getJitMax()); }
/** * Returns a new instance of the JRuby runtime configured with defaults. * * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */ public static Ruby newInstance() { return newInstance(new RubyInstanceConfig()); }
private Main(boolean hardExit) { // used only from main(String[]), so we process dotfile here processDotfile(); this.config = new RubyInstanceConfig(); config.setHardExit(hardExit); }
private Main(boolean hardExit) { // used only from main(String[]), so we process dotfile here processDotfile(); this.config = new RubyInstanceConfig(); config.setHardExit(hardExit); }
private Main(boolean hardExit) { // used only from main(String[]), so we process dotfile here processDotfile(); this.config = new RubyInstanceConfig(); config.setHardExit(hardExit); }
private static RubyInstanceConfig createOptimizedConfiguration() { RubyInstanceConfig config = new RubyInstanceConfig(); config.setCompatVersion(CompatVersion.RUBY1_9); config.setCompileMode(CompileMode.OFF); return config; }
private Main(boolean hardExit) { // used only from main(String[]), so we process dotfile here processDotfile(); this.config = new RubyInstanceConfig(); config.setHardExit(hardExit); }
static RubyInstanceConfig getGlobalRuntimeConfigOrNew() { return Ruby.isGlobalRuntimeReady() ? Ruby.getGlobalRuntime().getInstanceConfig() : new RubyInstanceConfig(); }
public ConcurrentLocalContextProvider(LocalVariableBehavior behavior, boolean lazy) { // To save startup time, Ruby runtime instantiation should be delayed as mush as possible // so, don't create runtime here. if (Ruby.isGlobalRuntimeReady()) config = Ruby.getGlobalRuntime().getInstanceConfig(); else config = new RubyInstanceConfig(); this.behavior = behavior; this.lazy = lazy; }
static RubyInstanceConfig getGlobalRuntimeConfigOrNew() { return Ruby.isGlobalRuntimeReady() ? Ruby.getGlobalRuntime().getInstanceConfig() : new RubyInstanceConfig(); }
public ConcurrentLocalContextProvider(LocalVariableBehavior behavior, boolean lazy) { // To save startup time, Ruby runtime instantiation should be delayed as mush as possible // so, don't create runtime here. if (Ruby.isGlobalRuntimeReady()) config = Ruby.getGlobalRuntime().getInstanceConfig(); else config = new RubyInstanceConfig(); this.behavior = behavior; this.lazy = lazy; }
public int run(NGContext context) { context.assertLoopbackClient(); RubyInstanceConfig config = new RubyInstanceConfig(); Main main = new Main(config); config.setCurrentDirectory(context.getWorkingDirectory()); config.setEnvironment(OSEnvironment.propertiesToStringMap(context.getEnv())); return main.run(context.getArgs()).getStatus(); } }
public int run(NGContext context) { context.assertLoopbackClient(); RubyInstanceConfig config = new RubyInstanceConfig(); Main main = new Main(config); config.setCurrentDirectory(context.getWorkingDirectory()); config.setEnvironment(OSEnvironment.propertiesToStringMap(context.getEnv())); return main.run(context.getArgs()).getStatus(); } }
public int run(NGContext context) { context.assertLoopbackClient(); RubyInstanceConfig config = new RubyInstanceConfig(); Main main = new Main(config); config.setCurrentDirectory(context.getWorkingDirectory()); config.setEnvironment(context.getEnv()); // reuse one cache of compiled bodies config.setClassCache(classCache); return main.run(context.getArgs()).getStatus(); } }