Examples of GlobalVariables


Examples of org.jruby.internal.runtime.GlobalVariables

        runtime.setGlobalVariables(globals);
    }

    private synchronized Object evalNode(Node node, ScriptContext ctx)
                            throws ScriptException {
        GlobalVariables oldGlobals = runtime.getGlobalVariables();
        try {
            setGlobalVariables(ctx);
            return rubyToJava(runtime.eval(node));
        } catch (Exception exp) {
            throw new ScriptException(exp);
View Full Code Here

Examples of org.jruby.internal.runtime.GlobalVariables

        return result;
    }  

    private synchronized Node compileScript(String script, ScriptContext ctx)
                                 throws ScriptException {
        GlobalVariables oldGlobals = runtime.getGlobalVariables()
        try {
            setErrorWriter(ctx.getErrorWriter());
            setGlobalVariables(ctx);
            String filename = (String) ctx.getAttribute(ScriptEngine.FILENAME);
            if (filename == null) {
View Full Code Here

Examples of org.jruby.internal.runtime.GlobalVariables

        }
    }

    private synchronized Node compileScript(Reader reader, ScriptContext ctx)
                                 throws ScriptException {
        GlobalVariables oldGlobals = runtime.getGlobalVariables()
        try {
            setErrorWriter(ctx.getErrorWriter());
            setGlobalVariables(ctx);
            String filename = (String) ctx.getAttribute(ScriptEngine.FILENAME);
            if (filename == null) {
View Full Code Here

Examples of org.jruby.internal.runtime.GlobalVariables

        return new FileInputStream(file);
    }

    private void setGlobalVariables(final ScriptContext ctx) {
        ctx.setAttribute("context", ctx, ScriptContext.ENGINE_SCOPE);
        setGlobalVariables(new GlobalVariables(runtime) {
                GlobalVariables parent = runtime.getGlobalVariables();

            @Override
                public void define(String name, IAccessor accessor) {
                    assert name != null;
View Full Code Here

Examples of org.jruby.internal.runtime.GlobalVariables

        runtime.setGlobalVariables(globals);
    }

    private synchronized Object evalNode(Node node, ScriptContext ctx)
                            throws ScriptException {
        GlobalVariables oldGlobals = runtime.getGlobalVariables();
        try {
            setWriterOutputStream(ctx.getWriter());
            setErrorWriter(ctx.getErrorWriter());
            setGlobalVariables(ctx);
            return rubyToJava(runtime.runNormally(node, false));
View Full Code Here

Examples of org.jruby.internal.runtime.GlobalVariables

                        Object[] args, Class returnType)
                        throws ScriptException {
        if (method == null) {
            throw new NullPointerException("method name is null");
        }
        GlobalVariables oldGlobals = runtime.getGlobalVariables();
        try {
            setWriterOutputStream(context.getWriter());
            setErrorWriter(context.getErrorWriter());
            setGlobalVariables(context);          
            IRubyObject rubyRecv = obj != null ?
View Full Code Here

Examples of org.jruby.internal.runtime.GlobalVariables

        return result;
    }  

    private synchronized Node compileScript(String script, ScriptContext ctx)
                                 throws ScriptException {       
        GlobalVariables oldGlobals = runtime.getGlobalVariables()
        try {
            setGlobalVariables(ctx);
            String filename = (String) ctx.getAttribute(ScriptEngine.FILENAME);
            if (filename == null) {
                filename = "<unknown>";
View Full Code Here

Examples of org.jruby.internal.runtime.GlobalVariables

        }
    }

    private synchronized Node compileScript(Reader reader, ScriptContext ctx)
                                 throws ScriptException {       
        GlobalVariables oldGlobals = runtime.getGlobalVariables()
        try {
            setGlobalVariables(ctx);
            String filename = (String) ctx.getAttribute(ScriptEngine.FILENAME);
            if (filename == null) {
                filename = "<unknown>";
View Full Code Here

Examples of org.jruby.internal.runtime.GlobalVariables

        }
    }

    private void setGlobalVariables(final ScriptContext ctx) {
        ctx.setAttribute("context", ctx, ScriptContext.ENGINE_SCOPE);
        setGlobalVariables(new GlobalVariables(runtime) {
                GlobalVariables parent = runtime.getGlobalVariables();
               
                public void define(String name, IAccessor accessor) {
                    assert name != null;
                    assert accessor != null;
View Full Code Here

Examples of org.jruby.internal.runtime.GlobalVariables

        runtime.setGlobalVariables(globals);
    }

    private synchronized Object evalNode(Node node, ScriptContext ctx)
                            throws ScriptException {
        GlobalVariables oldGlobals = runtime.getGlobalVariables();
        try {
            setGlobalVariables(ctx);
            return rubyToJava(runtime.eval(node));
        } catch (Exception exp) {
            throw new ScriptException(exp);
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.