示例#1
0
 public RModule(NetRuby rb, string name, RMetaObject spr)
     : base(rb, name, spr, rb.cModule)
 {
     if (name != null)
     {
         uint id = rb.intern(name);
         rb.class_tbl.Add(id, this);
     }
 }
示例#2
0
 internal RMetaObject(NetRuby rb, string name, RMetaObject sp, RMetaObject meta)
     : base(rb, meta)
 {
     super = sp;
     m_tbl = new st_table();
     if (name != null)
     {
         uint id = rb.intern(name);
         IVarSet("__classid__", Symbol.ID2SYM(id));
     }
 }
示例#3
0
        internal static void Init(NetRuby rb)
        {
            RThreadGroupClass t = new RThreadGroupClass(rb);

            t.DefineClass("ThreadGroup", rb.cObject);
            rb.cThreadGroup = t;
            t.DefineSingletonMethod("new", new RMethod(tg_new), -1);
            t.DefineMethod("list", new RMethod(list), 0);
            t.DefineMethod("add", new RMethod(add), 1);
            RThreadGroup rg = (RThreadGroup)tg_new(t);

            t.ConstSet(rb.intern("Default"), rg);
            rg.Add(rb.GetCurrentContext());
        }
示例#4
0
        internal void Init(NetRuby rb)
        {
            if (klass == null)
            {
                klass = rb.cThread;
            }
            rClass = rb.cObject;
            ////frame.self = rb.topSelf;
            ////cRef = rb.topCRef;
            abortOnException = rb.cThread.abortOnException;

            RThreadGroup tg = (RThreadGroup)rb.cThreadGroup.ConstGetAt(rb.intern("Default"));

            tg.Add(this);
        }
示例#5
0
 public bool IsIVarDefined(string name)
 {
     return(IsIVarDefined(ruby.intern(name)));
 }