org.jruby.runtime
Class SharedScopeBlock
java.lang.Object
org.jruby.runtime.Block
org.jruby.runtime.SharedScopeBlock
public class SharedScopeBlock
- extends Block
Represents the live state of a for or END construct in Ruby. This is different from an
ordinary block in that it does not have its own scoped variables. It leeches those from
the next outer scope. Because of this we do not set up, clone, nor tear down scope-related
stuff. Also because of this we do not need to clone the block since it state does not change.
Methods inherited from class org.jruby.runtime.Block |
arity, call, createBinding, createBlock, getCRef, getDynamicScope, getFrame, getKlass, getProcObject, getVisibility, isGiven, post, setProcObject, setSelf, setVisibility, yield, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createSharedScopeBlock
public static Block createSharedScopeBlock(ThreadContext context,
IterNode iterNode,
DynamicScope dynamicScope,
IRubyObject self)
pre
protected void pre(ThreadContext context,
RubyModule klass)
- Overrides:
pre
in class Block
call
public IRubyObject call(ThreadContext context,
IRubyObject[] args,
IRubyObject replacementSelf)
cloneBlock
public Block cloneBlock()
- Overrides:
cloneBlock
in class Block
Copyright © 2002-2007 JRuby Team. All Rights Reserved.