From 9c1abe2a6c5e6288ed208000fbf811d145af9355 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Fri, 15 Nov 2019 03:51:06 +0900 Subject: 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. --- inits.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inits.c') 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 -- cgit v1.2.1