示例#1
0
  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
 public InterpretedBlock(IterNode iterNode, int argumentType) {
   this(
       iterNode, Arity.procArityOf(iterNode == null ? null : iterNode.getVarNode()), argumentType);
 }