Package org.jruby.runtime

Examples of org.jruby.runtime.Block.call()


        JumpTarget jumpTarget = newBlock.getBinding().getFrame().getJumpTarget();
       
        try {
            if (self != null) newBlock.getBinding().setSelf(self);
           
            return newBlock.call(context, args);
        } catch (JumpException.BreakJump bj) {
            switch(block.type) {
            case LAMBDA: if (bj.getTarget() == jumpTarget) {
                return (IRubyObject) bj.getValue();
            } else {
View Full Code Here


        int jumpTarget = newBlock.getBinding().getFrame().getJumpTarget();
       
        try {
            if (self != null) newBlock.getBinding().setSelf(self);
           
            return newBlock.call(context, args, passedBlock);
        } catch (JumpException.BreakJump bj) {
            return handleBreakJump(getRuntime(), newBlock, bj, jumpTarget);
        } catch (JumpException.ReturnJump rj) {
            return handleReturnJump(context, rj, jumpTarget);
        } catch (JumpException.RetryJump rj) {
View Full Code Here

        int jumpTarget = newBlock.getBinding().getFrame().getJumpTarget();
       
        try {
            if (self != null) newBlock.getBinding().setSelf(self);
           
            return newBlock.call(context, args, passedBlock);
        } catch (JumpException.BreakJump bj) {
            return handleBreakJump(getRuntime(), newBlock, bj, jumpTarget);
        } catch (JumpException.ReturnJump rj) {
            return handleReturnJump(context, rj, jumpTarget);
        } catch (JumpException.RetryJump rj) {
View Full Code Here

        } else {
            newBlock = block.cloneBlockAndFrame();
            newBlock.getBinding().setSelf(self);
        }
       
        return newBlock.call(context, args, passedBlock);
    }

    @JRubyMethod(name = "arity")
    public RubyFixnum arity() {
        return getRuntime().newFixnum(block.arity().getValue());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.