Examples of JRubyEngineFactory


Examples of org.jruby.embed.jsr223.JRubyEngineFactory

    @Test
    public void test2JRubyEngineFactoryWithWrongPropertyName() throws Exception {
        System.setProperty( PropertyName.CLASSLOADER.toString(), "something");
        // we do have an instance of "jruby" loaded via some other classloader
        ScriptEngineManager m = new ScriptEngineManager();
        m.registerEngineName( "jruby", new JRubyEngineFactory() );
        ScriptEngine jruby = m.getEngineByName("jruby");
        String result = jruby.eval("$LOAD_PATH" ).toString();
        assertNotNull(result);

        assertEquals(jruby.eval("JRuby.runtime.jruby_class_loader.parent" ), cl );
View Full Code Here

Examples of org.jruby.embed.jsr223.JRubyEngineFactory

    @Test
    public void test3JRubyEngineFactoryWithNoneClassloaderPropertyName() throws Exception {
        System.setProperty( PropertyName.CLASSLOADER.toString(), "none");
        // we do have an instance of "jruby" loaded via some other classloader
        ScriptEngineManager m = new ScriptEngineManager();
        m.registerEngineName( "jruby", new JRubyEngineFactory() );
        ScriptEngine jruby = m.getEngineByName("jruby");
        String result = jruby.eval("$LOAD_PATH" ).toString();
        assertNotNull(result);

        assertEquals(jruby.eval("JRuby.runtime.jruby_class_loader.parent" ), cl );
View Full Code Here

Examples of org.jruby.embed.jsr223.JRubyEngineFactory

    @Test
    public void test4JRubyEngineFactory() throws Exception {
        // we do have an instance of "jruby" loaded via some other classloader
        ScriptEngineManager m = new ScriptEngineManager();
        m.registerEngineName( "jruby", new JRubyEngineFactory() );
        ScriptEngine jruby = m.getEngineByName("jruby");
        String result = jruby.eval("$LOAD_PATH" ).toString();
        assertNotNull(result);

        assertEquals(jruby.eval("JRuby.runtime.jruby_class_loader.parent" ), cl );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.