public final class Block
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Block.Type |
| Modifier and Type | Field and Description |
|---|---|
private Binding |
binding |
private BlockBody |
body |
private Block |
escapeBlock
What block to use for determining escape; defaults to this
|
private boolean |
escaped
Whether this block and any clones of it should be considered "escaped"
|
static Block |
NULL_BLOCK
All Block variables should either refer to a real block or this NULL_BLOCK.
|
private RubyProc |
proc
The Proc that this block is associated with.
|
Block.Type |
type |
| Constructor and Description |
|---|
Block(BlockBody body) |
Block(BlockBody body,
Binding binding) |
private RubyProc proc
public Block.Type type
private final Binding binding
private final BlockBody body
private boolean escaped
private Block escapeBlock
public static final Block NULL_BLOCK
public Block(BlockBody body)
public IRubyObject call(ThreadContext context, IRubyObject[] args)
public IRubyObject call(ThreadContext context, IRubyObject[] args, Block block)
public IRubyObject call(ThreadContext context)
public IRubyObject call(ThreadContext context, Block block)
public IRubyObject yieldSpecific(ThreadContext context)
public IRubyObject call(ThreadContext context, IRubyObject arg0)
public IRubyObject call(ThreadContext context, IRubyObject arg0, Block block)
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0)
public IRubyObject call(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject call(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
public IRubyObject call(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public IRubyObject call(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public IRubyObject yield(ThreadContext context, IRubyObject value)
@Deprecated public IRubyObject yield(ThreadContext context, IRubyObject value, IRubyObject self, RubyModule klass, boolean aValue)
public IRubyObject yieldNonArray(ThreadContext context, IRubyObject value, IRubyObject self, RubyModule klass)
public IRubyObject yieldArray(ThreadContext context, IRubyObject value, IRubyObject self, RubyModule klass)
@Deprecated public IRubyObject yield(ThreadContext context, IRubyObject value, boolean aValue)
@Deprecated public IRubyObject yield(ThreadContext context, boolean aValue)
public Block cloneBlock()
public Block cloneBlockAndFrame()
public Block cloneBlockForEval(IRubyObject self)
public Arity arity()
public RubyProc getProcObject()
public void setProcObject(RubyProc procObject)
procObject - public final boolean isGiven()
public Binding getBinding()
public BlockBody getBody()
public Frame getFrame()
public boolean isEscaped()
public void escape()
public boolean equals(java.lang.Object other)
equals in class java.lang.Object