diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-24 23:49:19 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-24 23:49:19 +0000 |
commit | f8e3019d5e496f9634fe1a11416f9c7a7fa9585b (patch) | |
tree | 6567f3704e8a0de623b7b7a2b7119fdfa3436423 /tool/compile_prelude.rb | |
parent | 2ee810e8f6ed83813d99b790f5c8bd0527011b16 (diff) | |
download | ruby-f8e3019d5e496f9634fe1a11416f9c7a7fa9585b.tar.gz ruby-f8e3019d5e496f9634fe1a11416f9c7a7fa9585b.tar.xz ruby-f8e3019d5e496f9634fe1a11416f9c7a7fa9585b.zip |
* tool/compile_prelude.rb: fix to include "vm_core.h".
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/compile_prelude.rb')
-rw-r--r-- | tool/compile_prelude.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tool/compile_prelude.rb b/tool/compile_prelude.rb index 13ccb8ace..cdf686179 100644 --- a/tool/compile_prelude.rb +++ b/tool/compile_prelude.rb @@ -2,14 +2,16 @@ prelude, outfile = *ARGV lines = [] -File.readlines(prelude).each{|line| - lines << "#{line.dump}" +lines = File.readlines(prelude).map{|line| + line.dump } open(outfile, 'w'){|f| f.puts <<EOS__ #include "ruby/ruby.h" +#include "vm_core.h" + static const char *prelude_code = #{lines.join("\n")} ; @@ -18,7 +20,11 @@ Init_prelude(void) { rb_iseq_eval(rb_iseq_compile( rb_str_new2(prelude_code), - rb_str_new2("prelude.rb"), INT2FIX(1))); + rb_str_new2("#{File.basename(prelude)}"), INT2FIX(1))); + +#if 0 + printf("%s\n", prelude_code); +#endif } EOS__ } |