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); }
@Override public IRubyObject call( ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) { ARITY.checkArity(context.runtime, args); return nullPointer; }
public MethodBlock(RubyMethod method, StaticScope staticScope) { super( staticScope, Arity.createArity((int) method.arity().getLongValue()), BlockBody.SINGLE_RESTARG); this.method = method; String filename = method.getFilename(); if (filename == null) filename = "(method)"; this.filename = filename; this.line = method.getLine(); }
public InterpretedBlock(IterNode iterNode, int argumentType) { this( iterNode, Arity.procArityOf(iterNode == null ? null : iterNode.getVarNode()), argumentType); }