Ejemplo n.º 1
0
 public static MutableString GetCreateId(RubyScope scope)
 {
     return(RubyOps.GetInstanceVariable(scope, GetModule(scope, "JSON"), "@create_id") as MutableString);
 }
Ejemplo n.º 2
0
 public static RubyArray /*!*/ Precision(BigDecimal /*!*/ self)
 {
     return(RubyOps.MakeArray2(self.Precision * BigDecimal.BASE_FIG, self.MaxPrecision * BigDecimal.BASE_FIG));
 }
Ejemplo n.º 3
0
 public static RubyArray /*!*/ Coerce(BigDecimal /*!*/ self, BigDecimal /*!*/ other)
 {
     return(RubyOps.MakeArray2(other, self));
 }
Ejemplo n.º 4
0
 private string GetDebuggerDisplayType()
 {
     return(RubyOps.GetDebuggerDisplayType(_immediateClass));
 }
Ejemplo n.º 5
0
        public object Call(Proc procArg, object arg1, object arg2, object arg3, object arg4)
        {
            var blockParam = RubyOps.CreateBfcForProcCall(this);

            return(RubyOps.MethodProcCall(blockParam, RubyOps.Yield4(arg1, arg2, arg3, arg4, procArg, _self, blockParam)));
        }
Ejemplo n.º 6
0
 protected RubyObject(SerializationInfo /*!*/ info, StreamingContext context)
 {
     RubyOps.DeserializeObject(out _instanceData, out _immediateClass, info);
 }
Ejemplo n.º 7
0
 public RubyInstanceData /*!*/ GetInstanceData()
 {
     return(RubyOps.GetInstanceData(ref _instanceData));
 }
Ejemplo n.º 8
0
 public static object NewAnonymousStruct(BlockParam block, RubyClass /*!*/ self, SymbolId className,
                                         [NotNull] params object[] /*!*/ attributeNames)
 {
     return(CreateAnonymousWithFirstAttribute(block, self, RubyOps.ConvertSymbolIdToSymbol(className), attributeNames));
 }
Ejemplo n.º 9
0
 public static RubyArray Coerce(BigInteger /*!*/ self, [NotNull] BigInteger /*!*/ other)
 {
     return(RubyOps.MakeArray2(other, self));
 }
Ejemplo n.º 10
0
        public static object ToSymbol(int self)
        {
            SymbolId result;

            return(RubyOps.TryConvertFixnumToSymbol(self, out result) ? (object)result : null);
        }
Ejemplo n.º 11
0
 public static RubyArray /*!*/ Coerce(RubyContext /*!*/ context, BigDecimal /*!*/ self, BigInteger /*!*/ other)
 {
     return(RubyOps.MakeArray2(BigDecimal.Create(GetConfig(context), other.ToString(CultureInfo.InvariantCulture)), self));
 }
Ejemplo n.º 12
0
 public static RubyArray Coerce(RubyContext /*!*/ context, double self, object other)
 {
     return(RubyOps.MakeArray2(Protocols.ConvertToFloat(context, other), self));
 }
Ejemplo n.º 13
0
 public static bool IsComplexYaml(RubyContext /*!*/ context, MutableString /*!*/ self)
 {
     return(RubyOps.IsTrue(RubyRepresenter.ToYamlStyle(context, self)) ||
            RubyRepresenter.ToYamlProperties(context, self).Count == 0 ||
            AFTER_NEWLINE(self.ConvertToString()));
 }
Ejemplo n.º 14
0
 public static object NewAnonymousStruct(BlockParam block, RubyClass /*!*/ self, [NotNull] RubySymbol /*!*/ firstAttibuteName,
                                         [DefaultProtocol, NotNullItems] params string /*!*/[] /*!*/ attributeNames)
 {
     return(CreateAnonymousWithFirstAttribute(block, self, RubyOps.ConvertSymbolToClrString(firstAttibuteName), attributeNames));
 }
Ejemplo n.º 15
0
 public static RubyArray /*!*/ Coerce(double self, [DefaultProtocol] double other)
 {
     return(RubyOps.MakeArray2(other, self));
 }
Ejemplo n.º 16
0
        public object Call(object arg1, object arg2, object arg3)
        {
            var blockParam = RubyOps.CreateBfcForProcCall(this);

            return(RubyOps.MethodProcCall(blockParam, RubyOps.Yield3(arg1, arg2, arg3, _self, blockParam)));
        }
Ejemplo n.º 17
0
 string /*!*/ IRubyObject.BaseToString()
 {
     return(RubyOps.ObjectToString(this));
 }
Ejemplo n.º 18
0
 // R(4, *)
 public override object InvokeSplat(BlockParam /*!*/ param, object self, object arg1, object arg2, object arg3, object arg4, object splattee)
 {
     return(InvokeSplatInternal(param, self, RubyOps.MakeArray4(arg1, arg2, arg3, arg4), splattee));
 }
Ejemplo n.º 19
0
 public virtual void GetObjectData(SerializationInfo /*!*/ info, StreamingContext context)
 {
     RubyOps.SerializeObject(_instanceData, _immediateClass, info);
 }
Ejemplo n.º 20
0
 // R(N, *)
 public override object InvokeSplat(BlockParam /*!*/ param, object self, object[] /*!*/ args, object splattee)
 {
     Debug.Assert(args.Length > MaxBlockArity);
     return(InvokeSplatInternal(param, self, RubyOps.MakeArrayN(args), splattee));
 }
Ejemplo n.º 21
0
 private string GetDebuggerDisplayValue()
 {
     return(RubyOps.GetDebuggerDisplayValue(_immediateClass, this));
 }
Ejemplo n.º 22
0
 public static RubyArray ToStrToInt(RubyModule /*!*/ self, [DefaultProtocol] Union <MutableString, int> value)
 {
     return(RubyOps.MakeArray2(value.First, value.Second));
 }
Ejemplo n.º 23
0
        // Call overloads don't check parameter count, this is done by Proc#call.

        public object Call(Proc procArg)
        {
            var blockParam = RubyOps.CreateBfcForProcCall(this);

            return(RubyOps.MethodProcCall(blockParam, RubyOps.Yield0(procArg, _self, blockParam)));
        }
Ejemplo n.º 24
0
 public static bool Equal(RubyContext /*!*/ context, object lhs, object rhs)
 {
     return(RubyOps.IsTrue(EqualSharedSite.Target(EqualSharedSite, context, lhs, rhs)));
 }
Ejemplo n.º 25
0
 public static RubyArray /*!*/ DivMod(int self, int other)
 {
     return(RubyOps.MakeArray2(Divide(self, other), Modulo(self, other)));
 }
Ejemplo n.º 26
0
 public static bool RespondTo(RubyContext /*!*/ context, object obj, SymbolId name)
 {
     return(RubyOps.IsTrue(RespondToSharedSite.Target(RespondToSharedSite, context, obj, name)));
 }
Ejemplo n.º 27
0
 public static RubyArray /*!*/ Split(BigDecimal /*!*/ self)
 {
     return(RubyOps.MakeArray4(self.Sign, MutableString.CreateAscii(self.GetFractionString()), 10, self.Exponent));
 }
Ejemplo n.º 28
0
 public static bool RespondTo(RubyContext /*!*/ context, object obj, string name)
 {
     return(RubyOps.IsTrue(RespondToSharedSite.Target(RespondToSharedSite, context, obj, SymbolTable.StringToId(name))));
 }
Ejemplo n.º 29
0
 public static RubyArray /*!*/ Coerce(RubyContext /*!*/ context, BigDecimal /*!*/ self, double other)
 {
     return(RubyOps.MakeArray2(other, ToFloat(context, self)));
 }
Ejemplo n.º 30
0
 public static RubyArray /*!*/ Coerce(RubyContext /*!*/ context, BigDecimal /*!*/ self, int other)
 {
     return(RubyOps.MakeArray2(BigDecimal.Create(GetConfig(context), other.ToString()), self));
 }