Package org.jruby.javasupport.JavaEmbedUtils

Examples of org.jruby.javasupport.JavaEmbedUtils.EvalUnit


            throw context.getRuntime().newSystemStackError("stack level too deep", soe);
        }
    }

    private Object run(String fileinfo, int line, Object scriptUnit) {
        EvalUnit unit = null;
        if (scriptUnit instanceof String) {
            unit = container.parse(scriptUnit.toString(), line);
        } else if (scriptUnit instanceof Reader) {
            unit = container.parse((Reader)scriptUnit, fileinfo, line);
        } else if (scriptUnit instanceof InputStream) {
            unit = container.parse((InputStream)scriptUnit, fileinfo, line);
        } else if (scriptUnit instanceof PathType) {
            unit = container.parse((PathType)scriptUnit, fileinfo, line);
        }
        if (unit == null) {
            return null;
        }
        IRubyObject ret = unit.run();
        return JavaEmbedUtils.rubyToJava(ret);
    }
View Full Code Here


            throw context.runtime.newSystemStackError("stack level too deep", soe);
        }
    }

    private Object run(String fileinfo, int line, Object scriptUnit) {
        EvalUnit unit = null;
        if (scriptUnit instanceof String) {
            unit = container.parse(scriptUnit.toString(), line);
        } else if (scriptUnit instanceof Reader) {
            unit = container.parse((Reader)scriptUnit, fileinfo, line);
        } else if (scriptUnit instanceof InputStream) {
            unit = container.parse((InputStream)scriptUnit, fileinfo, line);
        } else if (scriptUnit instanceof PathType) {
            unit = container.parse((PathType)scriptUnit, fileinfo, line);
        }
        if (unit == null) {
            return null;
        }
        IRubyObject ret = unit.run();
        return JavaEmbedUtils.rubyToJava(ret);
    }
View Full Code Here

            throw context.runtime.newSystemStackError("stack level too deep", soe);
        }
    }

    private Object run(String fileinfo, int line, Object scriptUnit) {
        EvalUnit unit = null;
        if (scriptUnit instanceof String) {
            unit = container.parse(scriptUnit.toString(), line);
        } else if (scriptUnit instanceof Reader) {
            unit = container.parse((Reader)scriptUnit, fileinfo, line);
        } else if (scriptUnit instanceof InputStream) {
            unit = container.parse((InputStream)scriptUnit, fileinfo, line);
        } else if (scriptUnit instanceof PathType) {
            unit = container.parse((PathType)scriptUnit, fileinfo, line);
        }
        if (unit == null) {
            return null;
        }
        IRubyObject ret = unit.run();
        return JavaEmbedUtils.rubyToJava(ret);
    }
View Full Code Here

TOP

Related Classes of org.jruby.javasupport.JavaEmbedUtils.EvalUnit

Copyright © 2018 www.massapicom. 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.