コード例 #1
0
ファイル: InterpretedBlock.java プロジェクト: arkxu/jruby
  public static Block newInterpretedClosure(
      ThreadContext context, IterNode iterNode, IRubyObject self) {
    Binding binding = context.currentBinding(self);
    NodeType argsNodeId = getArgumentTypeWackyHack(iterNode);

    BlockBody body =
        new InterpretedBlock(
            iterNode, Arity.procArityOf(iterNode.getVarNode()), asArgumentType(argsNodeId));
    return new Block(body, binding);
  }
コード例 #2
0
ファイル: InterpretedBlock.java プロジェクト: arkxu/jruby
 public InterpretedBlock(IterNode iterNode, int argumentType) {
   this(
       iterNode, Arity.procArityOf(iterNode == null ? null : iterNode.getVarNode()), argumentType);
 }