示例#1
0
 public static double ConvertStringToFloat(RubyContext /*!*/ context, MutableString /*!*/ value)
 {
     return(RubyOps.ConvertStringToFloat(context, value.ConvertToString()));
 }
示例#2
0
 public bool Yield(object[] /*!*/ args, out object blockResult)
 {
     return(BlockJumped(blockResult = RubyOps.Yield(args, null, Self, this)));
 }
示例#3
0
 public bool YieldSplat(IList /*!*/ args, out object blockResult)
 {
     return(BlockJumped(blockResult = RubyOps.YieldSplat0(args, null, Self, this)));
 }
示例#4
0
 public bool Yield(object arg1, object arg2, object arg3, object arg4, out object blockResult)
 {
     return(BlockJumped(blockResult = RubyOps.Yield4(arg1, arg2, arg3, arg4, null, Self, this)));
 }
示例#5
0
 public bool Yield(out object blockResult)
 {
     return(BlockJumped(blockResult = RubyOps.Yield0(null, Self, this)));
 }
示例#6
0
 /// <summary>
 /// Must be called on the result of RubyOps.Yield. Implements post-yield control flow operation.
 /// </summary>
 /// <remarks>
 /// Used by library methods that take a block. The binder creates an instance of BlockParam holding on RFC if necessary.
 /// A library method that creates a block yet doesn't take one needs to manage RFC on its own.
 /// </remarks>
 internal bool BlockJumped(object returnValue)
 {
     // if this method is a proc converter then the current frame is Proc.Converter, otherwise it is not available:
     return(RubyOps.MethodYieldRfc(_isLibProcConverter ? _proc.Converter : null, this, returnValue));
 }
示例#7
0
 public bool Yield(object arg1, out object blockResult)
 {
     return(BlockJumped(blockResult = RubyOps.Yield1(arg1, Self, this)));
 }
示例#8
0
 private static object EvaluateInModuleNoJumpCheck(RubyModule /*!*/ self, BlockParam /*!*/ block)
 {
     block.ModuleDeclaration = self;
     return(RubyOps.Yield1(self, self, block));
 }