示例#1
0
        internal static Loader Init(NetRuby rb)
        {
            Loader ld = new Loader(rb);

            rb.DefineReadonlyVariable("$-I", null, new GlobalEntry.Getter(ld.lpGetter));
            rb.DefineReadonlyVariable("$:", null, new GlobalEntry.Getter(ld.lpGetter));
            rb.DefineReadonlyVariable("$LOAD_PATH", null, new GlobalEntry.Getter(ld.lpGetter));
            rb.DefineReadonlyVariable("$\"", null, new GlobalEntry.Getter(ld.ftGetter));
            rb.DefineGlobalFunction("load", new RBasic.RMethod(ld.f_load), -1);
            rb.DefineGlobalFunction("require", new RBasic.RMethod(ld.require), 1);
            return(ld);
        }