private void initRubyKernel() { // We cannot load any .rb and debug new parser features if (RubyInstanceConfig.DEBUG_PARSER) return; // load Ruby parts of core loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel.rb", false); }
private void initRubyPreludes() { // We cannot load any .rb and debug new parser features if (RubyInstanceConfig.DEBUG_PARSER) return; // load Ruby parts of core loadService.loadFromClassLoader(getClassLoader(), "jruby/preludes.rb", false); }
private void initRubyKernel() { // We cannot load any .rb and debug new parser features if (RubyInstanceConfig.DEBUG_PARSER) return; // load Ruby parts of core loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel.rb", false); }
private void initRubyPreludes() { // We cannot load any .rb and debug new parser features if (RubyInstanceConfig.DEBUG_PARSER) return; // load Ruby parts of core loadService.loadFromClassLoader(getClassLoader(), "jruby/preludes.rb", false); }
private void loadBundler() { loadService.loadFromClassLoader(getClassLoader(), "jruby/bundler/startup.rb", false); }
private void loadBundler() { loadService.loadFromClassLoader(getClassLoader(), "jruby/bundler/startup.rb", false); }
private void initRubyKernel() { // We cannot load any .rb and debug new parser features if (RubyInstanceConfig.DEBUG_PARSER) return; // load Ruby parts of core loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel.rb", false); switch (config.getCompatVersion()) { case RUBY1_8: loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel18.rb", false); break; case RUBY1_9: loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel19.rb", false); break; case RUBY2_0: loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel20.rb", false); break; } }
private void initRubyKernel() { // We cannot load any .rb and debug new parser features if (RubyInstanceConfig.DEBUG_PARSER) return; // load Ruby parts of core loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel.rb", false); switch (config.getCompatVersion()) { case RUBY1_8: loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel18.rb", false); break; case RUBY1_9: loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel19.rb", false); break; case RUBY2_0: loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel20.rb", false); break; } }
public void load(Ruby runtime, boolean wrap) { runtime.getLoadService().require("java"); // load Ruby parts of the 'jruby' library runtime.getLoadService().loadFromClassLoader(runtime.getJRubyClassLoader(), "jruby/jruby.rb", false); RubyModule JRuby = runtime.getOrCreateModule("JRuby"); JRuby.defineAnnotatedMethods(JRubyLibrary.class); JRuby.defineAnnotatedMethods(JRubyUtilLibrary.class); JRuby.defineClassUnder("ThreadLocal", runtime.getObject(), JRubyThreadLocal.ALLOCATOR) .defineAnnotatedMethods(JRubyExecutionContextLocal.class); JRuby.defineClassUnder("FiberLocal", runtime.getObject(), JRubyFiberLocal.ALLOCATOR) .defineAnnotatedMethods(JRubyExecutionContextLocal.class); RubyModule CONFIG = JRuby.defineModuleUnder("CONFIG"); CONFIG.getSingletonClass().defineAnnotatedMethods(JRubyConfig.class); }
public void load(Ruby runtime, boolean wrap) { runtime.getLoadService().require("java"); // load Ruby parts of the 'jruby' library runtime.getLoadService().loadFromClassLoader(runtime.getJRubyClassLoader(), "jruby/jruby.rb", false); RubyModule JRuby = runtime.getOrCreateModule("JRuby"); JRuby.defineAnnotatedMethods(JRubyLibrary.class); JRuby.defineAnnotatedMethods(JRubyUtilLibrary.class); JRuby.defineClassUnder("ThreadLocal", runtime.getObject(), JRubyThreadLocal.ALLOCATOR) .defineAnnotatedMethods(JRubyExecutionContextLocal.class); JRuby.defineClassUnder("FiberLocal", runtime.getObject(), JRubyFiberLocal.ALLOCATOR) .defineAnnotatedMethods(JRubyExecutionContextLocal.class); RubyModule CONFIG = JRuby.defineModuleUnder("CONFIG"); CONFIG.getSingletonClass().defineAnnotatedMethods(JRubyConfig.class); }
public void load(Ruby runtime, boolean wrap) { ThreadContext context = runtime.getCurrentContext(); runtime.getLoadService().require("java"); // load Ruby parts of the 'jruby' library runtime.getLoadService().loadFromClassLoader(runtime.getJRubyClassLoader(), "jruby/jruby.rb", false); // define JRuby module RubyModule jrubyModule = runtime.getOrCreateModule("JRuby"); jrubyModule.defineAnnotatedMethods(JRubyLibrary.class); jrubyModule.defineAnnotatedMethods(JRubyUtilLibrary.class); RubyClass threadLocalClass = jrubyModule.defineClassUnder("ThreadLocal", runtime.getObject(), JRubyThreadLocal.ALLOCATOR); threadLocalClass.defineAnnotatedMethods(JRubyExecutionContextLocal.class); RubyClass fiberLocalClass = jrubyModule.defineClassUnder("FiberLocal", runtime.getObject(), JRubyFiberLocal.ALLOCATOR); fiberLocalClass.defineAnnotatedMethods(JRubyExecutionContextLocal.class); new JRubyConfigLibrary().load(runtime, wrap); }
public void load(Ruby runtime, boolean wrap) { ThreadContext context = runtime.getCurrentContext(); runtime.getLoadService().require("java"); // load Ruby parts of the 'jruby' library runtime.getLoadService().loadFromClassLoader(runtime.getJRubyClassLoader(), "jruby/jruby.rb", false); // define JRuby module RubyModule jrubyModule = runtime.getOrCreateModule("JRuby"); jrubyModule.defineAnnotatedMethods(JRubyLibrary.class); jrubyModule.defineAnnotatedMethods(JRubyUtilLibrary.class); RubyClass threadLocalClass = jrubyModule.defineClassUnder("ThreadLocal", runtime.getObject(), JRubyThreadLocal.ALLOCATOR); threadLocalClass.defineAnnotatedMethods(JRubyExecutionContextLocal.class); RubyClass fiberLocalClass = jrubyModule.defineClassUnder("FiberLocal", runtime.getObject(), JRubyFiberLocal.ALLOCATOR); fiberLocalClass.defineAnnotatedMethods(JRubyExecutionContextLocal.class); new JRubyConfigLibrary().load(runtime, wrap); }
loadService.loadFromClassLoader(getClassLoader(), "jruby/bundler/startup.rb", false);
loadService.loadFromClassLoader(getClassLoader(), "jruby/bundler/startup.rb", false);