aboutsummaryrefslogtreecommitdiffstats
path: root/tool/compile_prelude.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/compile_prelude.rb')
-rw-r--r--tool/compile_prelude.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/compile_prelude.rb b/tool/compile_prelude.rb
index 60d56fba64..2ffccc0d93 100644
--- a/tool/compile_prelude.rb
+++ b/tool/compile_prelude.rb
@@ -8,6 +8,7 @@ $:.unshift(File.expand_path("../..", __FILE__))
preludes = ARGV.dup
outfile = preludes.pop
+init_name = outfile[/\w+(?=_prelude.c\z)/] || 'prelude'
C_ESC = {
"\\" => "\\\\",
@@ -72,7 +73,7 @@ static const char prelude_code<%=i%>[] =
% }
void
-Init_prelude(void)
+Init_<%=init_name%>(void)
{
% lines_list.each_with_index {|(setup_lines, lines), i|
rb_iseq_eval(rb_iseq_compile(