Examples of runNormally()


Examples of org.jruby.Ruby.runNormally()

   */
  public static Object createJRubyObject(String scriptSource, Class<?>[] interfaces, ClassLoader classLoader) {
    Ruby ruby = initializeRuntime();

    Node scriptRootNode = ruby.parseEval(scriptSource, "", null, 0);
        IRubyObject rubyObject = ruby.runNormally(scriptRootNode);

    if (rubyObject instanceof RubyNil) {
      String className = findClassName(scriptRootNode);
      rubyObject = ruby.evalScriptlet("\n" + className + ".new");
    }
View Full Code Here

Examples of org.jruby.Ruby.runNormally()

  public static Object createJRubyObject(String scriptSource, Class[] interfaces, ClassLoader classLoader) {
    Ruby ruby = initializeRuntime();

    Node scriptRootNode = ruby.parseEval(scriptSource, "", null, 0);
    // keep using the deprecated runNormally variant for JRuby 1.1/1.2 compatibility...
    IRubyObject rubyObject = ruby.runNormally(scriptRootNode, false);

    if (rubyObject instanceof RubyNil) {
      String className = findClassName(scriptRootNode);
      rubyObject = ruby.evalScriptlet("\n" + className + ".new");
    }
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.