Exemplo n.º 1
0
        public bool Yield(object[] /*!*/ args, out object blockResult)
        {
            ContractUtils.RequiresNotNull(args, "args");
            switch (args.Length)
            {
            case 0: blockResult = RubyOps.Yield0(Self, this); break;

            case 1: blockResult = RubyOps.Yield1(args[0], Self, this); break;

            case 2: blockResult = RubyOps.Yield2(args[0], args[1], Self, this); break;

            case 3: blockResult = RubyOps.Yield3(args[0], args[1], args[2], Self, this); break;

            case 4: blockResult = RubyOps.Yield4(args[0], args[1], args[2], args[3], Self, this); break;

            default: blockResult = RubyOps.YieldN(args, Self, this); break;
            }
            return(BlockJumped(blockResult));
        }
Exemplo n.º 2
0
 public bool Yield(out object blockResult)
 {
     return(BlockJumped(blockResult = RubyOps.Yield0(null, Self, this)));
 }