зеркало из https://github.com/github/ruby.git
* tool/compile_prelude.rb: fix to include "vm_core.h".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
4c86818f47
Коммит
2f17991bd1
|
@ -1,3 +1,7 @@
|
||||||
|
Sat Aug 25 08:47:28 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* tool/compile_prelude.rb: fix to include "vm_core.h".
|
||||||
|
|
||||||
Sat Aug 25 03:49:14 2007 Tanaka Akira <akr@fsij.org>
|
Sat Aug 25 03:49:14 2007 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* test/ruby/sentence.rb (Sentence): include Enumerable.
|
* test/ruby/sentence.rb (Sentence): include Enumerable.
|
||||||
|
|
|
@ -2,14 +2,16 @@
|
||||||
prelude, outfile = *ARGV
|
prelude, outfile = *ARGV
|
||||||
lines = []
|
lines = []
|
||||||
|
|
||||||
File.readlines(prelude).each{|line|
|
lines = File.readlines(prelude).map{|line|
|
||||||
lines << "#{line.dump}"
|
line.dump
|
||||||
}
|
}
|
||||||
|
|
||||||
open(outfile, 'w'){|f|
|
open(outfile, 'w'){|f|
|
||||||
f.puts <<EOS__
|
f.puts <<EOS__
|
||||||
|
|
||||||
#include "ruby/ruby.h"
|
#include "ruby/ruby.h"
|
||||||
|
#include "vm_core.h"
|
||||||
|
|
||||||
static const char *prelude_code =
|
static const char *prelude_code =
|
||||||
#{lines.join("\n")}
|
#{lines.join("\n")}
|
||||||
;
|
;
|
||||||
|
@ -18,7 +20,11 @@ Init_prelude(void)
|
||||||
{
|
{
|
||||||
rb_iseq_eval(rb_iseq_compile(
|
rb_iseq_eval(rb_iseq_compile(
|
||||||
rb_str_new2(prelude_code),
|
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__
|
EOS__
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче