Package org.jruby

Examples of org.jruby.RubyProc


    if (method instanceof PositionAware) {
      PositionAware positionAware = (PositionAware)method;
      return runtime.newArray(runtime.newString(positionAware.getFile()),
                              runtime.newFixnum(positionAware.getLine() + 1));
    } else if (method instanceof ProcMethod) {
      RubyProc proc = (RubyProc)getPrivateField(runtime, ProcMethod.class, "proc", method);
      String file = (String)getPrivateField(runtime, RubyProc.class, "file", proc);
      int line = getPrivateIntField(runtime, RubyProc.class, "line", proc);
      RubyString rubyFile = runtime.newString(file);
      RubyFixnum rubyLine = runtime.newFixnum(line + 1);
      return runtime.newArray(rubyFile, rubyLine);
View Full Code Here

TOP

Related Classes of org.jruby.RubyProc

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.