コード例 #1
0
ファイル: BigDecimalOps.cs プロジェクト: gaybro8777/ironruby
        public static MutableString /*!*/ Inspect(RubyContext /*!*/ context, BigDecimal /*!*/ self)
        {
            MutableString str = MutableString.CreateMutable();

            str.AppendFormat("#<{0}:", context.GetClassOf(self).Name);
            RubyUtils.AppendFormatHexObjectId(str, RubyUtils.GetObjectId(context, self));
            str.AppendFormat(",'{0}',", self.ToString(10));
            str.AppendFormat("{0}({1})>", self.PrecisionDigits.ToString(), self.MaxPrecisionDigits.ToString());
            return(str);
        }
コード例 #2
0
 public static MutableString /*!*/ AppendFormatHexObjectId(MutableString /*!*/ str, int objectId)
 {
     return(str.AppendFormat("0x{0:x7}", 2 * objectId));
 }
コード例 #3
0
ファイル: RubyUtils.cs プロジェクト: mscottford/ironruby
 public static MutableString/*!*/ AppendFormatHexObjectId(MutableString/*!*/ str, int objectId) {
     return str.AppendFormat("0x{0:x7}", 2 * objectId);
 }