mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
9c1abe2a6c
The script in prelude.rb was embed in MRI to load it (eval this script at everyboot). This commit change the loading process of prelude.rb. MRI doesn't eval a script, but load from compiled binary with builtin feature. So that Init_prelude() does not load `prelude.rb` now.
81 lines
1.5 KiB
C
81 lines
1.5 KiB
C
/**********************************************************************
|
|
|
|
inits.c -
|
|
|
|
$Author$
|
|
created at: Tue Dec 28 16:01:58 JST 1993
|
|
|
|
Copyright (C) 1993-2007 Yukihiro Matsumoto
|
|
|
|
**********************************************************************/
|
|
|
|
#include "internal.h"
|
|
#include "builtin.h"
|
|
#include "prelude.rbinc"
|
|
|
|
#define CALL(n) {void Init_##n(void); Init_##n();}
|
|
|
|
void
|
|
rb_call_inits(void)
|
|
{
|
|
#if USE_TRANSIENT_HEAP
|
|
CALL(TransientHeap);
|
|
#endif
|
|
CALL(vm_postponed_job);
|
|
CALL(Method);
|
|
CALL(RandomSeedCore);
|
|
CALL(encodings);
|
|
CALL(sym);
|
|
CALL(var_tables);
|
|
CALL(Object);
|
|
CALL(top_self);
|
|
CALL(Encoding);
|
|
CALL(Comparable);
|
|
CALL(Enumerable);
|
|
CALL(String);
|
|
CALL(Exception);
|
|
CALL(eval);
|
|
CALL(safe);
|
|
CALL(jump);
|
|
CALL(Numeric);
|
|
CALL(Bignum);
|
|
CALL(syserr);
|
|
CALL(Array);
|
|
CALL(Hash);
|
|
CALL(Struct);
|
|
CALL(Regexp);
|
|
CALL(transcode);
|
|
CALL(marshal);
|
|
CALL(Range);
|
|
CALL(IO);
|
|
CALL(Dir);
|
|
CALL(Time);
|
|
CALL(Random);
|
|
CALL(signal);
|
|
CALL(load);
|
|
CALL(Proc);
|
|
CALL(Binding);
|
|
CALL(Math);
|
|
CALL(Enumerator);
|
|
CALL(VM);
|
|
CALL(ISeq);
|
|
CALL(Thread);
|
|
CALL(process);
|
|
CALL(Cont);
|
|
CALL(Rational);
|
|
CALL(Complex);
|
|
CALL(version);
|
|
CALL(vm_stack_canary);
|
|
CALL(gc_stress);
|
|
|
|
// enable builtin loading
|
|
CALL(builtin);
|
|
|
|
CALL(GC);
|
|
CALL(IO_nonblock);
|
|
CALL(ast);
|
|
CALL(vm_trace);
|
|
CALL(pack);
|
|
load_prelude();
|
|
}
|
|
#undef CALL
|