[前][次][番号順一覧][スレッド一覧]

ruby-changes:1763

From: ko1@a...
Date: 25 Aug 2007 08:49:30 +0900
Subject: [ruby-changes:1763] ko1 - Ruby:r13254 (trunk): * tool/compile_prelude.rb: fix to include "vm_core.h".

ko1	2007-08-25 08:49:19 +0900 (Sat, 25 Aug 2007)

  New Revision: 13254

  Modified files:
    trunk/ChangeLog
    trunk/tool/compile_prelude.rb

  Log:
    * tool/compile_prelude.rb: fix to include "vm_core.h".
    


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/tool/compile_prelude.rb?r1=13254&r2=13253
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13254&r2=13253

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13253)
+++ ChangeLog	(revision 13254)
@@ -1,3 +1,7 @@
+Sat Aug 25 08:47:28 2007  Koichi Sasada  <ko1@a...>
+
+	* tool/compile_prelude.rb: fix to include "vm_core.h".
+
 Sat Aug 25 03:49:14 2007  Tanaka Akira  <akr@f...>
 
 	* test/ruby/sentence.rb (Sentence): include Enumerable.
Index: tool/compile_prelude.rb
===================================================================
--- tool/compile_prelude.rb	(revision 13253)
+++ tool/compile_prelude.rb	(revision 13254)
@@ -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 @@
 {
   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__
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]