Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.runtime;
 
Common type for all block types which share similar values that ThreadContext uses.
 
 public abstract class ContextAwareBlockBody extends BlockBody {
    
The static scope for the block body
    protected StaticScope scope;

    
The 'Arity' of the block
    private final Arity arity;
    public ContextAwareBlockBody(StaticScope scopeArity arityint argumentType) {
        super(argumentType);
        
        this. = scope;
        this. = arity;
    }
    protected Frame pre(ThreadContext contextRubyModule klassBinding binding) {
        return context.preYieldSpecificBlock(bindingklass);
    }
    protected void post(ThreadContext contextBinding bindingVisibility visFrame lastFrame) {
        binding.getFrame().setVisibility(vis);
        context.postYield(bindinglastFrame);
    }
    public StaticScope getStaticScope() {
        return ;
    }
    public void setStaticScope(StaticScope newScope) {
        this. = newScope;
    }
    public Arity arity() {
        return ;
    }
    public Block cloneBlock(Binding binding) {
        // We clone dynamic scope because this will be a new instance of a block.  Any previously
        // captured instances of this block may still be around and we do not want to start
        // overwriting those values when we create a new one.
        // ENEBO: Once we make self, lastClass, and lastMethod immutable we can remove duplicate
        return new Block(thisbinding.clone());
    }
New to GrepCode? Check out our FAQ X