summaryrefslogtreecommitdiff
path: root/inits.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2019-11-15 03:51:06 +0900
committerKoichi Sasada <ko1@atdot.net>2019-11-15 03:55:46 +0900
commit9c1abe2a6c5e6288ed208000fbf811d145af9355 (patch)
treef28651846facc692cb7667ca5496d24741fd1a49 /inits.c
parentc9ffe751d126a302d0e7e53e645e44084e339dde (diff)
load prelude.rb by builtin features.
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.
Diffstat (limited to 'inits.c')
-rw-r--r--inits.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/inits.c b/inits.c
index 9ced248618..490506e3bf 100644
--- a/inits.c
+++ b/inits.c
@@ -10,6 +10,8 @@
**********************************************************************/
#include "internal.h"
+#include "builtin.h"
+#include "prelude.rbinc"
#define CALL(n) {void Init_##n(void); Init_##n();}
@@ -66,6 +68,7 @@ rb_call_inits(void)
CALL(vm_stack_canary);
CALL(gc_stress);
+ // enable builtin loading
CALL(builtin);
CALL(GC);
@@ -73,5 +76,6 @@ rb_call_inits(void)
CALL(ast);
CALL(vm_trace);
CALL(pack);
+ load_prelude();
}
#undef CALL